refactor(web): add Redux state management and centralised routing

- Replace inline BrowserRouter with createBrowserRouter and lazy-loaded pages
- Add Redux store with auth-slice (token management) and redux-persist
- Create RequireAuth guard using Redux state via isAuthenticated selector
- Wire Layout logout to dispatch setToken("") clearing persisted auth
- Add ErrorPage component for route error handling
- Add EmptyLayout for unauthenticated pages
- Add VITE_REDUX_STORAGE env var for storage selection
This commit is contained in:
2026-07-07 15:17:49 +08:00
parent 3a6cd42361
commit 163f5641e5
13 changed files with 375 additions and 43 deletions
+4
View File
@@ -11,3 +11,7 @@
# Default: https://pipely.onixbyte.com/
# Development: http://localhost:8080
VITE_API_BASE_URL=https://pipely.onixbyte.com/
# Redux Persistent storage location
# Options: `local` (default), `session`
VITE_REDUX_STORAGE=local