Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions website/src/css/customTheme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,6 @@ a:hover {
}

@media only screen and (min-width: 768px) {
.react-toggle {
display: none;
}

.arch-card-caption > p {
width: 50%;
}
Expand Down
34 changes: 1 addition & 33 deletions website/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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 = () => (
<Layout>
<ThemeResetComponent />
<Head>
<meta
name="twitter:title"
Expand Down
Loading