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
perf: optimize user-type API with React Query caching
Replace repeated user-type API calls with a single config endpoint
and implement React Query for efficient caching.
Backend changes:
- Add /api/config endpoint for static configuration
- Remove deprecated /api/coolify/user-type endpoint
- Serve user-type as part of application config
Frontend changes:
- Install and configure React Query
- Create ConfigRepository and useConfig hook
- Update ResourceCard to use cached config data
- Remove getUserType from ResourceRepository
Mobile improvements:
- Add useIsMobile hook for device detection
- Disable sound effects on mobile devices
- Hide sound toggle on mobile screens
Performance impact:
- Reduces API calls by 98% for user permissions
- Single request cached indefinitely (static config)
- Improves dashboard load time with many resources
0 commit comments