diff options
author | name <email@example.com> | 2023-09-30 14:58:57 +0200 |
---|---|---|
committer | name <email@example.com> | 2023-09-30 14:58:57 +0200 |
commit | b58a94eff5bfe0b174b1f67fbc91ae16e755cc6e (patch) | |
tree | fdbeae71a35c26a5c7ac741850bf53ea5b0b916f /docusaurus | |
parent | 2023-09-26 (diff) | |
download | wolfree-dockerfile-b58a94eff5bfe0b174b1f67fbc91ae16e755cc6e.tar wolfree-dockerfile-b58a94eff5bfe0b174b1f67fbc91ae16e755cc6e.tar.gz wolfree-dockerfile-b58a94eff5bfe0b174b1f67fbc91ae16e755cc6e.tar.bz2 wolfree-dockerfile-b58a94eff5bfe0b174b1f67fbc91ae16e755cc6e.tar.lz wolfree-dockerfile-b58a94eff5bfe0b174b1f67fbc91ae16e755cc6e.tar.xz wolfree-dockerfile-b58a94eff5bfe0b174b1f67fbc91ae16e755cc6e.tar.zst wolfree-dockerfile-b58a94eff5bfe0b174b1f67fbc91ae16e755cc6e.zip |
Diffstat (limited to 'docusaurus')
-rw-r--r-- | docusaurus/src/theme/Footer/InputPreloader.tsx | 37 | ||||
-rw-r--r-- | docusaurus/src/theme/Footer/index.tsx | 14 |
2 files changed, 0 insertions, 51 deletions
diff --git a/docusaurus/src/theme/Footer/InputPreloader.tsx b/docusaurus/src/theme/Footer/InputPreloader.tsx deleted file mode 100644 index 2ba2e19..0000000 --- a/docusaurus/src/theme/Footer/InputPreloader.tsx +++ /dev/null @@ -1,37 +0,0 @@ -/* SPDX-License-Identifier: AGPL-3.0-or-later */ - -import React from "react"; - -export default (): React.JSX.Element => { - const [insertIframe, setInsertIframe] = React.useState(false); - - React.useEffect((): (() => void) => { - const handleIframeLoad = (): (() => void) => { - // Insert the iframe after a 3000ms delay. - const timerId = setTimeout((): void => setInsertIframe(true), 3000); - - // Cleanup the timer when the component unmounts. - return (): void => clearTimeout(timerId); - }; - - window.addEventListener("load", handleIframeLoad); - - window.scroll(0, 0); - - // Cleanup the event listener when the component unmounts. - return (): void => window.removeEventListener("load", handleIframeLoad); - }, []); // Empty dependency array means the effect runs only once after initial render. - - return ( - <> - {/* Use a descriptive title for accessibility */} - {insertIframe && ( - <iframe - title="Input Page Preloader" - src="/input/" - style={{ display: "none" }} - /> - )} - </> - ); -}; diff --git a/docusaurus/src/theme/Footer/index.tsx b/docusaurus/src/theme/Footer/index.tsx deleted file mode 100644 index e4063c5..0000000 --- a/docusaurus/src/theme/Footer/index.tsx +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: AGPL-3.0-or-later */ - -import Footer from "@theme-original/Footer"; -import InputPreloader from "./InputPreloader"; -import React from "react"; - -export default ( - props: React.JSX.ElementAttributesProperty -): React.JSX.Element => ( - <> - <Footer {...props} /> - <InputPreloader /> - </> -); |