Changeset 42da64d for frontend/src/App.jsx
- Timestamp:
- 05/13/26 00:35:13 (8 weeks ago)
- Branches:
- master
- Children:
- 447c39f
- Parents:
- a8381b1
- File:
-
- 1 edited
-
frontend/src/App.jsx (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/App.jsx
ra8381b1 r42da64d 1 1 import { Navigate, Route, Routes } from "react-router-dom"; 2 import { clearAuthSession, getAuthToken, isTokenExpired } from "./utils/authSession"; 2 3 3 4 import LandingPage from "./pages/LandingPage/LandingPage.jsx"; … … 23 24 24 25 function RequireAuth({ children }) { 25 const token = localStorage.getItem("authToken"); 26 const token = getAuthToken(); 27 if (token && isTokenExpired(token)) { 28 clearAuthSession(); 29 return <Navigate to="/login" replace />; 30 } 26 31 if (!token) return <Navigate to="/login" replace />; 27 32 return children;
Note:
See TracChangeset
for help on using the changeset viewer.
