From 8da40f804a1e42208bd6ffafd43af0a5988e68db Mon Sep 17 00:00:00 2001 From: timorls <318739742@qq.com> Date: Wed, 12 Jan 2022 22:02:40 +0800 Subject: [PATCH] mode --- src/App.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 5797569..15e0f89 100644 --- a/src/App.js +++ b/src/App.js @@ -6,6 +6,7 @@ import Home from '@/pages/home' import { Provider } from "react-redux" import { HashRouter, Switch, Route, Redirect } from 'react-router-dom' + function App() { return ( @@ -13,7 +14,10 @@ function App() { - + { + return localStorage.getItem("token") ? + '/home' : '/login' + })()} exact />