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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user