1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

(nextjs) added SSR Loader

This commit is contained in:
Fedor Katurov 2022-01-19 16:48:49 +07:00
parent d7def635e3
commit 41b26e7d69
5 changed files with 79 additions and 1 deletions

View file

@ -0,0 +1,22 @@
import React, { Fragment, VFC } from 'react';
import { useSSRLoadingIndicator } from '~/hooks/dom/useSSRLoadingIndicator';
import styles from './styles.module.scss';
interface LoadingProgressProps {}
const LoadingProgress: VFC<LoadingProgressProps> = () => {
const shown = useSSRLoadingIndicator();
return shown ? (
<>
<div className={styles.loader} />
<div className={styles.label}>Секундочку...</div>
</>
) : (
<Fragment />
);
};
export { LoadingProgress };