mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 23:54:42 -04:00
fix: move dark mode and transparent body hook into renderer
These hooks are only necessary for the document and simple renderer. The slideshow handles theming itself. Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
e1a953c5bf
commit
efac46858c
4 changed files with 27 additions and 9 deletions
|
@ -5,21 +5,13 @@
|
|||
*/
|
||||
import { RendererToEditorCommunicatorContextProvider } from '../components/editor-page/render-context/renderer-to-editor-communicator-context-provider'
|
||||
import { RenderPageContent } from '../components/render-page/render-page-content'
|
||||
import { useApplyDarkModeStyle } from '../hooks/dark-mode/use-apply-dark-mode-style'
|
||||
import type { NextPage } from 'next'
|
||||
import React, { useEffect } from 'react'
|
||||
import React from 'react'
|
||||
|
||||
/**
|
||||
* Renders the actual markdown renderer that receives the content and metadata via iframe communication.
|
||||
*/
|
||||
export const RenderPage: NextPage = () => {
|
||||
useEffect(() => {
|
||||
document.body.classList.add('bg-transparent')
|
||||
return () => document.body.classList.remove('bg-transparent')
|
||||
}, [])
|
||||
|
||||
useApplyDarkModeStyle()
|
||||
|
||||
return (
|
||||
<RendererToEditorCommunicatorContextProvider>
|
||||
<RenderPageContent />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue