diff --git a/frontend/src/components/common/motd-modal/motd-modal.spec.tsx b/frontend/src/components/common/motd-modal/motd-modal.spec.tsx index 279b3ca3b..0656b5242 100644 --- a/frontend/src/components/common/motd-modal/motd-modal.spec.tsx +++ b/frontend/src/components/common/motd-modal/motd-modal.spec.tsx @@ -6,9 +6,9 @@ import * as UseBaseUrlModule from '../../../hooks/common/use-base-url' import { mockI18n } from '../../../test-utils/mock-i18n' import { testId } from '../../../utils/test-id' -import * as RenderIframeModule from '../../common/render-iframe/render-iframe' import type { CommonModalProps } from '../modals/common-modal' import * as CommonModalModule from '../modals/common-modal' +import * as RendererIframeModule from '../renderer-iframe/renderer-iframe' import * as fetchMotdModule from './fetch-motd' import { MotdModal } from './motd-modal' import { act, render, screen } from '@testing-library/react' @@ -17,7 +17,7 @@ import React from 'react' jest.mock('./fetch-motd') jest.mock('../modals/common-modal') -jest.mock('../../common/render-iframe/render-iframe') +jest.mock('../renderer-iframe/renderer-iframe') jest.mock('../../../hooks/common/use-base-url') describe('motd modal', () => { @@ -39,7 +39,7 @@ describe('motd modal', () => { ) }) as React.FC>) - jest.spyOn(RenderIframeModule, 'RenderIframe').mockImplementation((props) => { + jest.spyOn(RendererIframeModule, 'RendererIframe').mockImplementation((props) => { return ( This is a mock implementation of a iframe renderer. Props: {JSON.stringify(props)} diff --git a/frontend/src/components/common/motd-modal/motd-modal.tsx b/frontend/src/components/common/motd-modal/motd-modal.tsx index 01c809869..675a28c51 100644 --- a/frontend/src/components/common/motd-modal/motd-modal.tsx +++ b/frontend/src/components/common/motd-modal/motd-modal.tsx @@ -9,7 +9,7 @@ import { testId } from '../../../utils/test-id' import { EditorToRendererCommunicatorContextProvider } from '../../editor-page/render-context/editor-to-renderer-communicator-context-provider' import { RendererType } from '../../render-page/window-post-message-communicator/rendering-message' import { CommonModal } from '../modals/common-modal' -import { RenderIframe } from '../render-iframe/render-iframe' +import { RendererIframe } from '../renderer-iframe/renderer-iframe' import { fetchMotd, MOTD_LOCAL_STORAGE_KEY } from './fetch-motd' import React, { useCallback, useMemo, useEffect, useState } from 'react' import { Button, Modal } from 'react-bootstrap' @@ -55,7 +55,7 @@ export const MotdModal: React.FC = () => { {...cypressId('motd-modal')}> - { +export interface RendererIframeProps extends Omit { rendererType: RendererType forcedDarkMode?: DarkModePreference frameClasses?: string @@ -36,7 +36,7 @@ export interface RenderIframeProps extends Omit = ({ +export const RendererIframe: React.FC = ({ markdownContentLines, scrollState, onScroll, diff --git a/frontend/src/components/document-read-only-page/document-read-only-page-content.tsx b/frontend/src/components/document-read-only-page/document-read-only-page-content.tsx index ceba69c93..54b603ec4 100644 --- a/frontend/src/components/document-read-only-page/document-read-only-page-content.tsx +++ b/frontend/src/components/document-read-only-page/document-read-only-page-content.tsx @@ -5,7 +5,7 @@ */ import { useTrimmedNoteMarkdownContentWithoutFrontmatter } from '../../hooks/common/use-trimmed-note-markdown-content-without-frontmatter' import { setRendererStatus } from '../../redux/renderer-status/methods' -import { RenderIframe } from '../common/render-iframe/render-iframe' +import { RendererIframe } from '../common/renderer-iframe/renderer-iframe' import { RendererType } from '../render-page/window-post-message-communicator/rendering-message' import { DocumentInfobar } from './document-infobar' import React, { Fragment } from 'react' @@ -23,7 +23,7 @@ export const DocumentReadOnlyPageContent: React.FC = () => { return ( - = ({ extensi

- @@ -24,7 +24,7 @@ export type EditorDocumentRendererProps = Omit< * * @param scrollState The {@link ScrollState} that should be sent to the renderer * @param onScroll A callback that is executed when the view in the rendered is scrolled - * @param props Every property from the {@link RenderIframe} except the markdown content + * @param props Every property from the {@link RendererIframe} except the markdown content */ export const EditorDocumentRenderer: React.FC = ({ scrollState, onScroll, ...props }) => { const trimmedContentLines = useTrimmedNoteMarkdownContentWithoutFrontmatter() @@ -33,7 +33,7 @@ export const EditorDocumentRenderer: React.FC = ({ const adjustedScrollState = useScrollStateWithoutLineOffset(scrollState) return ( - { return ( - { return (
-