zhouna 3 лет назад
Родитель
Сommit
1078c769f1
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      src/components/Login/index.js

+ 4 - 0
src/components/Login/index.js

@@ -9,6 +9,10 @@ function Login({history}) {
         login();
     });*/
     //const dispatch = useDispatch();
+    const user = localStorage.getItem('token');
+    if(user){
+        history.push('/manage');
+    }
     function getLogin(){
         post(api.login,{
             "password": "a123456",