import React, { useEffect, useState } from 'react'
import { Outlet } from 'react-router-dom'
import BSMainLoader from '../loaders/BSMainLoader'

export default function UserExist() {

    const [loading, setLoading] = useState(true)
  
    useEffect(()=>{
      const timer = setTimeout(()=>{
          setLoading(false)
      },1000)
  
      return () => clearTimeout(timer)
    },[])

  return (
    <>
    {loading ? 
        <BSMainLoader />
        :
        <Outlet />
    }
    </>
  )
}
