import React from 'react'; import { Helmet } from 'react-helmet'; import { useGlobalState, ActionType, Theme } from '../../context'; import { Logo } from '../Logo'; import { Animation } from '../Animation'; import * as classes from './style.module.css'; export function SplashScreen(): React.ReactElement { const [shouldUnmount, setShouldUnmount] = React.useState(false); const { dispatch } = useGlobalState(); return ( { if (shouldUnmount) dispatch({ type: ActionType.SetSplashScreenDone, value: true }); }} >
{ // Wait 500ms and start unmounting the splash screen setTimeout(() => { setShouldUnmount(true); }, 500); }} />
); }