28 lines
		
	
	
	
		
			720 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			720 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}`} />
 | |
|                     </svg>
 | |
|                 </div>
 | |
|             </div>
 | |
|         )
 | |
|     else return
 | |
| }
 | |
| 
 | |
| export default LoadingScreen
 |