Skip to content

Commit

Permalink
Merge pull request #4246 from serlo/fix/add-serlo-context-to-renderer
Browse files Browse the repository at this point in the history
fix(frontend): add serlo-only-features context to renderer as well
  • Loading branch information
elbotho authored Nov 4, 2024
2 parents 09ed5d4 + 29b36f3 commit 4c466f4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions apps/web/src/serlo-editor-integration/editor-renderer.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { StaticRenderer } from '@editor/static-renderer/static-renderer'
import { AnyEditorDocument } from '@editor/types/editor-plugins'
import { SerloOnlyFeaturesContext } from '@editor/utils/serlo-extra-context'

export function EditorRenderer({
document,
}: {
document: unknown
}): JSX.Element {
return (
<div className="serlo-content-with-spacing-fixes">
<StaticRenderer document={document as AnyEditorDocument} />
</div>
<SerloOnlyFeaturesContext.Provider value={{ isSerlo: true }}>
<div className="serlo-content-with-spacing-fixes">
<StaticRenderer document={document as AnyEditorDocument} />
</div>
</SerloOnlyFeaturesContext.Provider>
)
}

0 comments on commit 4c466f4

Please sign in to comment.