import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom'; import { useState, useEffect } from 'react'; import LoginForm from './components/LoginForm'; //import RegisterForm from './components/RegisterForm'; import Md5Tool from './components/Md5Tool'; import HasherTool from './components/HasherTool'; import Base64Tool from './components/Base64Tool'; import JwtDecoderTool from './components/JwtDecoderTool'; import PasswordGenTool from './components/PasswordGenTool'; import TimestampTool from './components/TimestampTool'; import TextDiffTool from './components/TextDiffTool'; import QrCodeTool from './components/QrCodeTool'; import MarkdownTool from './components/MarkdownTool'; import ColorConverterTool from './components/ColorConverterTool'; import JsonFormatterTool from './components/JsonFormatterTool'; import RegexTesterTool from './components/RegexTesterTool'; import HashVerifierTool from './components/HashVerifierTool'; import UrlTool from './components/UrlTool'; import StringUtilsTool from './components/StringUtilsTool'; import CronExplainerTool from './components/CronExplainerTool'; import IpCalcTool from './components/IpCalcTool'; import LoremIpsumTool from './components/LoremIpsumTool'; import CsvViewerTool from './components/CsvViewerTool'; import NotesTool from './components/NotesTool'; import NavBar from './components/NavBar'; import ToolOverview from './components/ToolOverview'; import AdminDashboard from './components/AdminDashboard'; import ErrorBoundary from './components/ErrorBoundary'; import './css/base.css'; import './css/buttons.css'; import './css/dark.css'; import './css/light.css'; import './css/menu.css'; import './css/admin.css'; function App() { const [isLoggedIn, setIsLoggedIn] = useState(localStorage.getItem('token') !== null); const [role, setRole] = useState(localStorage.getItem('role')); useEffect(() => { const sync = () => { setIsLoggedIn(localStorage.getItem('token') !== null); setRole(localStorage.getItem('role')); }; window.addEventListener('storage', sync); return () => window.removeEventListener('storage', sync); }, []); return ( : } /> } /> {/*} />*/} : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> : } /> ); } export default App;