From af3c7848a97d676bfd47f86534c3769835828dab Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Tue, 11 Apr 2023 17:23:42 +0200 Subject: [PATCH] refactor: rename iframe-markdown-renderer to render-page-content Signed-off-by: Tilman Vatteroth --- .../{iframe-markdown-renderer.tsx => render-page-content.tsx} | 2 +- frontend/src/pages/render.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename frontend/src/components/render-page/{iframe-markdown-renderer.tsx => render-page-content.tsx} (99%) diff --git a/frontend/src/components/render-page/iframe-markdown-renderer.tsx b/frontend/src/components/render-page/render-page-content.tsx similarity index 99% rename from frontend/src/components/render-page/iframe-markdown-renderer.tsx rename to frontend/src/components/render-page/render-page-content.tsx index 518d58d7d..cf4d2b85c 100644 --- a/frontend/src/components/render-page/iframe-markdown-renderer.tsx +++ b/frontend/src/components/render-page/render-page-content.tsx @@ -20,7 +20,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' /** * Wraps the markdown rendering in an iframe. */ -export const IframeMarkdownRenderer: React.FC = () => { +export const RenderPageContent: React.FC = () => { const [markdownContentLines, setMarkdownContentLines] = useState([]) const [scrollState, setScrollState] = useState({ firstLineInView: 1, scrolledPercentage: 0 }) const [baseConfiguration, setBaseConfiguration] = useState(undefined) diff --git a/frontend/src/pages/render.tsx b/frontend/src/pages/render.tsx index b25dc1798..fe6439e76 100644 --- a/frontend/src/pages/render.tsx +++ b/frontend/src/pages/render.tsx @@ -4,7 +4,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ 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 type { NextPage } from 'next' import React from 'react' @@ -17,7 +17,7 @@ export const RenderPage: NextPage = () => { return ( - + ) }