void/components/LoadingScreen.tsx
2022-11-16 22:36:46 +01:00

28 lines
731 B
TypeScript

import styles from 'styles/LoadingScreen.module.sass'
import { useTheme } from 'next-themes'
import Image from 'next/image'
const LoadingScreen = ({
isLoading,
className,
}: {
isLoading: boolean
className?: string
}) => {
// @ts-ignore
const { resolvedTheme: theme } = useTheme()
if (isLoading)
return (
<div data-theme={theme} className={styles.cover}>
<div className={styles.center}>
<svg className={styles.svg} viewBox="0 0 200 200">
<use href={`/ValorantSymbol.svg#${theme || "light"}`} />
</svg>
</div>
</div>
)
else return
}
export default LoadingScreen