account and protected router

This commit is contained in:
Виталий Лавшонок
2025-11-05 00:08:51 +03:00
parent 994954c817
commit aeab03d35c
14 changed files with 173 additions and 85 deletions

View File

@@ -8,17 +8,8 @@ import Home from './pages/Home';
import Mission from './pages/Mission';
import ArticleEditor from './pages/ArticleEditor';
import Article from './pages/Article';
import { useEffect } from 'react';
import { loadTokensFromLocalStorage } from './redux/slices/auth';
import { useAppDispatch } from './redux/hooks';
function App() {
const dispatch = useAppDispatch();
useEffect(() => {
dispatch(loadTokensFromLocalStorage());
}, []);
return (
<div className="w-full h-full bg-liquid-background flex justify-center">
<div className="relative w-full max-w-[1600px] h-full ">
@@ -38,6 +29,3 @@ function App() {
}
export default App;
function useAppdispatch() {
throw new Error('Function not implemented.');
}