From dea13bfa90457a3e11aad606585c831556ef596f Mon Sep 17 00:00:00 2001 From: yamashush <38120991+yamashush@users.noreply.github.com> Date: Sat, 20 Jan 2024 12:47:02 +0900 Subject: [PATCH] delete baseURL args Signed-off-by: yamashush <38120991+yamashush@users.noreply.github.com> --- .../renderers/document/document-markdown-renderer.tsx | 2 +- .../render-page/renderers/document/document-toc-sidebar.tsx | 5 ++--- .../renderers/document/width-based-table-of-contents.tsx | 4 +--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/render-page/renderers/document/document-markdown-renderer.tsx b/frontend/src/components/render-page/renderers/document/document-markdown-renderer.tsx index 6f30e8f2d..a659b8e6a 100644 --- a/frontend/src/components/render-page/renderers/document/document-markdown-renderer.tsx +++ b/frontend/src/components/render-page/renderers/document/document-markdown-renderer.tsx @@ -99,7 +99,7 @@ export const DocumentMarkdownRenderer: React.FC = - + ) } diff --git a/frontend/src/components/render-page/renderers/document/document-toc-sidebar.tsx b/frontend/src/components/render-page/renderers/document/document-toc-sidebar.tsx index 17c091742..d1b76e8a1 100644 --- a/frontend/src/components/render-page/renderers/document/document-toc-sidebar.tsx +++ b/frontend/src/components/render-page/renderers/document/document-toc-sidebar.tsx @@ -12,16 +12,15 @@ import React, { useState } from 'react' export interface DocumentTocSidebarProps { width: number - baseUrl: string } -export const DocumentTocSidebar: React.FC = ({ width, baseUrl }) => { +export const DocumentTocSidebar: React.FC = ({ width }) => { const [tocAst, setTocAst] = useState() useExtensionEventEmitterHandler(TableOfContentsMarkdownExtension.EVENT_NAME, setTocAst) return (
- {tocAst !== undefined && } + {tocAst !== undefined && }
) } diff --git a/frontend/src/components/render-page/renderers/document/width-based-table-of-contents.tsx b/frontend/src/components/render-page/renderers/document/width-based-table-of-contents.tsx index 9482b4215..fcba40ab4 100644 --- a/frontend/src/components/render-page/renderers/document/width-based-table-of-contents.tsx +++ b/frontend/src/components/render-page/renderers/document/width-based-table-of-contents.tsx @@ -12,7 +12,6 @@ import React from 'react' export interface DocumentExternalTocProps { tocAst: TocAst width: number - baseUrl: string } const MAX_WIDTH_FOR_BUTTON_VISIBILITY = 1100 @@ -23,9 +22,8 @@ const MAX_WIDTH_FOR_BUTTON_VISIBILITY = 1100 * * @param tocAst the {@link TocAst AST} that should be rendered. * @param width the width that should be used to determine if the button should be shown. - * @param baseUrl the base url that will be used to generate the links //TODO: replace with consumer/provider (https://github.com/hedgedoc/hedgedoc/issues/5035) */ -export const WidthBasedTableOfContents: React.FC = ({ tocAst, width, baseUrl }) => { +export const WidthBasedTableOfContents: React.FC = ({ tocAst, width }) => { const rendererBaseUrl = useBaseUrl(ORIGIN.RENDERER) if (width >= MAX_WIDTH_FOR_BUTTON_VISIBILITY) {