diff --git a/src/component/auth/AuthLayout.jsx b/src/component/auth/AuthLayout.jsx index 387a2c0..1525d07 100644 --- a/src/component/auth/AuthLayout.jsx +++ b/src/component/auth/AuthLayout.jsx @@ -1,21 +1,25 @@ -import React, { useState } from 'react' +import React, { useEffect, useState } from 'react' import { Outlet } from 'react-router-dom' -// import MainLoaderBS from '../loaders/MainLoaderBS' +import MainLoaderBS from '../loaders/MainLoaderBS' export default function AuthLayout() { - const [loading, setLoading] = useState(false) + const [loading, setLoading] = useState(true) - // useEffect(()=>{ - // const timer = setTimeout(()=>{ - // setLoading(false) - // },500) + useEffect(()=>{ + const timer = setTimeout(()=>{ + setLoading(false) + },500) - // return () => clearTimeout(timer) - // },[]) + return () => clearTimeout(timer) + },[]) return (
- + {loading ? + + : + + }
) }