mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 06:34:39 -04:00
refactor: rename iframe-markdown-renderer to render-page-content
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
6f17b2f554
commit
d792fd3987
2 changed files with 3 additions and 3 deletions
|
@ -20,7 +20,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||||
/**
|
/**
|
||||||
* Wraps the markdown rendering in an iframe.
|
* Wraps the markdown rendering in an iframe.
|
||||||
*/
|
*/
|
||||||
export const IframeMarkdownRenderer: React.FC = () => {
|
export const RenderPageContent: React.FC = () => {
|
||||||
const [markdownContentLines, setMarkdownContentLines] = useState<string[]>([])
|
const [markdownContentLines, setMarkdownContentLines] = useState<string[]>([])
|
||||||
const [scrollState, setScrollState] = useState<ScrollState>({ firstLineInView: 1, scrolledPercentage: 0 })
|
const [scrollState, setScrollState] = useState<ScrollState>({ firstLineInView: 1, scrolledPercentage: 0 })
|
||||||
const [baseConfiguration, setBaseConfiguration] = useState<BaseConfiguration | undefined>(undefined)
|
const [baseConfiguration, setBaseConfiguration] = useState<BaseConfiguration | undefined>(undefined)
|
|
@ -4,7 +4,7 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
import { RendererToEditorCommunicatorContextProvider } from '../components/editor-page/render-context/renderer-to-editor-communicator-context-provider'
|
import { RendererToEditorCommunicatorContextProvider } from '../components/editor-page/render-context/renderer-to-editor-communicator-context-provider'
|
||||||
import { IframeMarkdownRenderer } from '../components/render-page/iframe-markdown-renderer'
|
import { RenderPageContent } from '../components/render-page/render-page-content'
|
||||||
import { useApplyDarkMode } from '../hooks/common/use-apply-dark-mode'
|
import { useApplyDarkMode } from '../hooks/common/use-apply-dark-mode'
|
||||||
import type { NextPage } from 'next'
|
import type { NextPage } from 'next'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
@ -17,7 +17,7 @@ export const RenderPage: NextPage = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RendererToEditorCommunicatorContextProvider>
|
<RendererToEditorCommunicatorContextProvider>
|
||||||
<IframeMarkdownRenderer />
|
<RenderPageContent />
|
||||||
</RendererToEditorCommunicatorContextProvider>
|
</RendererToEditorCommunicatorContextProvider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue