refactor: split apply-dark-mode hook into multiple hooks

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-04-26 20:47:05 +02:00
parent bcff03ef99
commit a23c215d8d
8 changed files with 70 additions and 60 deletions

View file

@ -5,7 +5,7 @@
*/
import { RendererToEditorCommunicatorContextProvider } from '../components/editor-page/render-context/renderer-to-editor-communicator-context-provider'
import { RenderPageContent } from '../components/render-page/render-page-content'
import { useApplyDarkMode } from '../hooks/dark-mode/use-apply-dark-mode'
import { useApplyDarkModeStyle } from '../hooks/dark-mode/use-apply-dark-mode-style'
import type { NextPage } from 'next'
import React from 'react'
@ -13,7 +13,7 @@ import React from 'react'
* Renders the actual markdown renderer that receives the content and metadata via iframe communication.
*/
export const RenderPage: NextPage = () => {
useApplyDarkMode()
useApplyDarkModeStyle()
return (
<RendererToEditorCommunicatorContextProvider>