Commit 57901879 authored by d.arizona's avatar d.arizona

update

parent 755b2adf
......@@ -7,7 +7,7 @@ import Constant from './library/Constant';
if (sessionStorage.getItem('reloaded') != null) {
console.log('page was reloaded');
} else {
localStorage.removeItem(Constant.TOKEN)
// localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}
sessionStorage.setItem('reloaded', 'yes');
......
......@@ -26,6 +26,7 @@ import Constant from "../library/Constant";
// work properly.
export default function BasicExample() {
return (
<Router basename={"/tia-web-dev"}>
<Switch>
......@@ -57,7 +58,15 @@ export default function BasicExample() {
}
function PrivateRoute({ children, ...rest }) {
// React.useEffect(() => {
// token()
// })
const logged = localStorage.getItem(Constant.TOKEN) !== null? true : false
// const token = async() => {
// let a = await localStorage.getItem(Constant.TOKEN)
// alert(a)
// }
return (
<Route
{...rest}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment