logout btn added
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { useLocation, useNavigate, Outlet } from 'react-router-dom'
|
||||
import Layout from '../components/layout/Layout'
|
||||
|
||||
import myLinks from '../myLinks'
|
||||
import PageLoader from '../components/PageLoader'
|
||||
@@ -13,7 +14,7 @@ export default function UserExists() {
|
||||
const [loading, setLoading] = useState(true)
|
||||
|
||||
useEffect(()=>{
|
||||
if(!state){
|
||||
if(!state || localStorage.getItem('active') != 'true'){
|
||||
return navigate(myLinks.getStarted, {replace:true})
|
||||
}
|
||||
setTimeout(()=>{
|
||||
@@ -27,7 +28,9 @@ export default function UserExists() {
|
||||
loading ?
|
||||
<PageLoader />
|
||||
:
|
||||
<Outlet />
|
||||
<Layout>
|
||||
<Outlet />
|
||||
</Layout>
|
||||
}
|
||||
</>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user