diff --git a/frontend/src/components/popup.tsx b/frontend/src/components/popup.tsx index 248cc2a..19b76f2 100644 --- a/frontend/src/components/popup.tsx +++ b/frontend/src/components/popup.tsx @@ -1,5 +1,7 @@ import React from "react"; import { createRoot } from "react-dom/client"; +import { i18nContext } from "../utils/i18n"; +import { i18nData } from "../i18n.ts"; export default function showPopup( content: React.ReactNode, @@ -43,7 +45,9 @@ export default function showPopup( document.body.appendChild(mask); createRoot(div).render( - {content}, + + {content} + , ); } diff --git a/frontend/src/pages/resource_details_page.tsx b/frontend/src/pages/resource_details_page.tsx index f579a63..d8d4e65 100644 --- a/frontend/src/pages/resource_details_page.tsx +++ b/frontend/src/pages/resource_details_page.tsx @@ -686,6 +686,7 @@ function fileSizeToString(size: number) { function FileTile({ file }: { file: RFile }) { const buttonRef = createRef(); + const buttonRef2 = createRef(); const { t } = useTranslation(); @@ -774,13 +775,14 @@ function FileTile({ file }: { file: RFile }) { {file.size > 10 * 1024 * 1024 ? ( { if (!app.cloudflareTurnstileSiteKey) { const link = network.getFileDownloadLink(file.id, ""); window.open(link, "_blank"); } else { - showPopup(, buttonRef.current!); + showPopup(, buttonRef2.current!); } }} >