From c03c70b07e175c55d67b39b4476eed55a72bd9a6 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Tue, 24 Jun 2025 16:41:05 +0100 Subject: [PATCH] auth layout fix --- src/component/auth/AuthLayout.jsx | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) 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 ? + + : + + }
) } -- 2.34.1