30112023
This commit is contained in:
10
src/App.js
10
src/App.js
@@ -16,11 +16,11 @@ import { useEffect } from 'react';
|
||||
const App = () =>{
|
||||
let navigate=useNavigate()
|
||||
|
||||
// useEffect(()=>{
|
||||
// if (!localStorage.getItem("firstname")) {
|
||||
// navigate('/login')
|
||||
// }
|
||||
// },[])
|
||||
useEffect(()=>{
|
||||
if (!localStorage.getItem("authname")) {
|
||||
navigate('/login')
|
||||
}
|
||||
},[])
|
||||
|
||||
|
||||
return <>
|
||||
|
||||
Reference in New Issue
Block a user