From 9b33ca3e0251511b5c3d6c336db0c9f32b61f4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chalifour?= Date: Wed, 2 Dec 2020 10:04:31 +0100 Subject: [PATCH] docs(website): remove code in landing page --- packages/website/src/pages/landing.js | 34 ++++----------------------- 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/packages/website/src/pages/landing.js b/packages/website/src/pages/landing.js index 83c6a0c6..2c002667 100644 --- a/packages/website/src/pages/landing.js +++ b/packages/website/src/pages/landing.js @@ -22,30 +22,6 @@ import { useLocation } from 'react-router'; import DocSearch from '../components/DocSearch'; import ErrorBoundary from '../components/ErrorBoundary'; -function Alert({ children }) { - const [isActive, setIsActive] = useState(true); - - useEffect(() => { - if (!isActive) { - return undefined; - } - - const timeoutId = setTimeout(() => { - setIsActive(false); - }, 5000); - - return () => { - clearTimeout(timeoutId); - }; - }, [isActive]); - - if (!isActive) { - return null; - } - - return children; -} - function Landing() { const { siteConfig } = useDocusaurusContext(); const { isDarkTheme } = useThemeContext(); @@ -116,12 +92,10 @@ function Landing() { indexName={credentials.indexName} /> ) : ( - - - The credentials provided from the URL were wrong, we will demo - the search with the search of our documentation instead. - - + + The credentials provided from the URL were wrong, we will demo the + search with the search of our documentation instead. + )}