From 26cdd0d363b1e279b14f7c5c3c12bb7d5e6d87d8 Mon Sep 17 00:00:00 2001 From: Nidboj132 Date: Wed, 12 Jul 2023 17:58:04 +0200 Subject: summary --- frontend/src/App.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'frontend/src/App.js') diff --git a/frontend/src/App.js b/frontend/src/App.js index 26aec98..c1745a7 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -5,14 +5,23 @@ import Sidebar from "./components/sidebar.js" import Main from "./components/main.js" import "./App.css"; +import Summary from "./components/pages/summary.js" export default function App() { + const [token, setToken] = React.useState(null); + const [mod,setMod] = React.useState(false) + React.useEffect(()=>{ + if(token!==null){ + setMod(JSON.parse(atob(token.split(".")[1])).mod) + } + },[token]) + return ( <> - + }> }> @@ -23,7 +32,8 @@ export default function App() { }> }> }> - }> + }> + }> -- cgit v1.2.3