2024-02-15 21:49:12 -05:00
|
|
|
import * as React from 'react';
|
|
|
|
import { PaletteMode } from '@mui/material';
|
|
|
|
import CssBaseline from '@mui/material/CssBaseline';
|
|
|
|
import Box from '@mui/material/Box';
|
|
|
|
import Divider from '@mui/material/Divider';
|
|
|
|
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
|
|
|
import ToggleButton from '@mui/material/ToggleButton';
|
|
|
|
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
|
|
|
import AutoAwesomeRoundedIcon from '@mui/icons-material/AutoAwesomeRounded';
|
|
|
|
import SvgMaterialDesign from '../components/SvgMaterialDesign';
|
|
|
|
import AppAppBar from '../components/AppAppBar';
|
|
|
|
import Hero from '../components/Hero';
|
|
|
|
import Highlights from '../components/Highlights';
|
|
|
|
import Pricing from '../components/Pricing';
|
|
|
|
import BetaAccess from '../components/BetaAccess';
|
|
|
|
import FAQ from '../components/FAQ';
|
|
|
|
import Footer from '../components/Footer';
|
2024-02-25 18:34:51 -05:00
|
|
|
import { useUser, } from "@auth0/nextjs-auth0/client";
|
|
|
|
import { getSession } from "@auth0/nextjs-auth0";
|
2024-02-15 21:49:12 -05:00
|
|
|
const defaultTheme = createTheme({});
|
2024-02-10 20:33:24 -05:00
|
|
|
|
2024-02-15 21:49:12 -05:00
|
|
|
interface ToggleCustomThemeProps {
|
|
|
|
showCustomTheme: Boolean;
|
|
|
|
toggleCustomTheme: () => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
function ToggleCustomTheme({
|
|
|
|
showCustomTheme,
|
|
|
|
toggleCustomTheme,
|
|
|
|
}: ToggleCustomThemeProps) {
|
2024-02-10 20:33:24 -05:00
|
|
|
return (
|
2024-02-15 21:49:12 -05:00
|
|
|
<Box
|
|
|
|
sx={{
|
|
|
|
display: 'flex',
|
|
|
|
flexDirection: 'column',
|
|
|
|
alignItems: 'center',
|
|
|
|
width: '100dvw',
|
|
|
|
position: 'fixed',
|
|
|
|
bottom: 24,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<ToggleButtonGroup
|
|
|
|
color="primary"
|
|
|
|
exclusive
|
|
|
|
value={showCustomTheme}
|
|
|
|
onChange={toggleCustomTheme}
|
|
|
|
aria-label="Platform"
|
|
|
|
sx={{
|
|
|
|
backgroundColor: 'background.default',
|
|
|
|
'& .Mui-selected': {
|
|
|
|
pointerEvents: 'none',
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<ToggleButton value>
|
|
|
|
<AutoAwesomeRoundedIcon sx={{ fontSize: '20px', mr: 1 }} />
|
|
|
|
Custom theme
|
|
|
|
</ToggleButton>
|
|
|
|
<ToggleButton value={false}>
|
|
|
|
<SvgMaterialDesign sx={{ fontSize: '20px', mr: 1 }} />
|
|
|
|
Material Design
|
|
|
|
</ToggleButton>
|
|
|
|
</ToggleButtonGroup>
|
|
|
|
</Box>
|
2024-02-10 20:33:24 -05:00
|
|
|
);
|
2024-02-15 21:49:12 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export default function LandingPage() {
|
|
|
|
const [showCustomTheme, setShowCustomTheme] = React.useState(true);
|
|
|
|
|
|
|
|
const { user, isLoading } = useUser();
|
2024-02-25 18:34:51 -05:00
|
|
|
|
2024-02-15 21:49:12 -05:00
|
|
|
return (
|
|
|
|
<ThemeProvider theme={defaultTheme}>
|
|
|
|
<CssBaseline />
|
|
|
|
<AppAppBar user={user} />
|
|
|
|
<Hero />
|
|
|
|
<Box sx={{ bgcolor: 'background.default' }}>
|
|
|
|
<Highlights />
|
|
|
|
<Divider />
|
|
|
|
<BetaAccess />
|
|
|
|
<Divider />
|
|
|
|
<FAQ />
|
|
|
|
<Footer />
|
|
|
|
</Box>
|
|
|
|
</ThemeProvider>
|
|
|
|
);
|
|
|
|
}
|