import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import Register from "./register/Register";
import Console from "./console/Console";
import {useEffect, useState} from "react";
import Login from "./console/login/Login";
import ResetPassword from "./resetPassword/ResetPassword"
const App = () => {
const [user, setUser] = useState();
useEffect(() => {
const localUser = localStorage.getItem("user");
if(localUser) {
setUser(JSON.parse(localUser));
console.log("reloaded user", localUser);
}
}, []);
const logout = () => {
setUser(null);
localStorage.clear();
}
const consoleComponent = user ? :
return (
} />
}/>
}/>
);
}
export default App;