mirror of
https://github.com/Nezumi-2711/react-training.git
synced 2026-09-22 20:01:59 +00:00
25 lines
440 B
TypeScript
25 lines
440 B
TypeScript
import { Outlet } from 'react-router-dom';
|
|
|
|
// Styled
|
|
import Spinner from '@commonStyle/Spinner';
|
|
import { FullPageLayout } from './styled';
|
|
|
|
// Hooks
|
|
import { useAccount } from '@hook/authentication/useAccount';
|
|
|
|
const RootLayout = () => {
|
|
const { isPending } = useAccount();
|
|
|
|
return isPending ? (
|
|
<FullPageLayout>
|
|
<Spinner />
|
|
</FullPageLayout>
|
|
) : (
|
|
<>
|
|
<Outlet />
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default RootLayout;
|