diff --git a/website/src/css/customTheme.scss b/website/src/css/customTheme.scss index 9d1950e8f7a42..dd210100a643f 100644 --- a/website/src/css/customTheme.scss +++ b/website/src/css/customTheme.scss @@ -415,10 +415,6 @@ a:hover { } @media only screen and (min-width: 768px) { - .react-toggle { - display: none; - } - .arch-card-caption > p { width: 50%; } diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index 9c9f3c6b54d77..895ab7e67decd 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -1,9 +1,7 @@ import type { FC } from 'react'; -import React, { useEffect } from 'react'; -import useThemeContext from '@theme/hooks/useThemeContext'; +import React from 'react'; import Layout from '@theme/Layout'; import Head from '@docusaurus/Head'; -import useWindowType from '@theme/hooks/useWindowSize'; import HeroSection from '../components/sections/HeroSection'; import Architecture from '../components/sections/Architecture'; @@ -13,38 +11,8 @@ import Comparison from '../components/sections/Comparison'; import OpensourcePromo from '../components/sections/OpensourcePromo'; import EndCTA from '../components/sections/Endcta'; -const ThemeResetComponent = () => { - const { isDarkTheme, setLightTheme } = useThemeContext(); - const windowType = useWindowType(); - - useEffect(() => { - if (windowType === 'mobile') { - // remove mode switch at navbar-sidebar - const sidebarModeSwitch = document.querySelector('div.navbar-sidebar__brand > div') as HTMLDivElement; - if (sidebarModeSwitch) { - sidebarModeSwitch.style.display = 'none'; - } - } else { - // remove mode switch at navbar - const navbarModeSwitch = document.querySelector('div.navbar__items.navbar__items--right > div.react-toggle') as HTMLDivElement; - if (navbarModeSwitch) { - navbarModeSwitch.style.display = 'none'; - } - } - }, [windowType]); - - useEffect(() => { - if (isDarkTheme) { - setLightTheme(); - } - }, [isDarkTheme]); - - return (null); -}; - const Index: FC = () => ( -