diff options
Diffstat (limited to 'docusaurus/src')
-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 /> - </> -); |