You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve loading states and fix authentication data fetching (#48)
* feat: replace redux-localstorage with redux-persist
- Update store configuration to use redux-persist instead of redux-localstorage
- Add PersistGate wrapper component for state rehydration
- Configure whitelist-based persistence for better control over persisted state
* feat: add loading state management for data fetching
- Add loading state tracking to Redux store with initial states for unit/service
- Implement GET_RESOURCE_START action to set loading states to true
- Update dataReducer to handle loading state transitions and normalize state structure
- Modify Dashboard component to use loading state instead of checking for undefined data
- Add setResourceFetchStart action dispatch in Main component before fetch operations
* fix: reset geolocation stage after login to prevent stuck state
- Add reset parameter to getInitialLocation() to reset currentStage
- Fix bug where geolocation wouldn't work after login due to persistent currentStage
- Ensure getNearestUnits() is called properly on subsequent app sessions
- Pass reset=true explicitly when calling getInitialLocation in Main component
* fix: ensure user authentication before data fetching in AppComponent
* fix: remove
unnecessary import
0 commit comments