airqo-platform / airqo-platform/AirQo-frontend
Remove dead "network" UI and code after Auth Service network removal
- Vorherrschende Sprache
- TypeScript
- Sterne
- 23
- Forks
- 48
- Ø Merge
- 15 Std. 49 Min.
- Gemergte PRs (30 T.)
- 63
Beschreibung
## Summary
**App:** `src/nexus/` in this repo. Paths below (which include their own `src/...`) are relative to that root — e.g. the first file is `src/nexus/src/app/(dashboard)/system/users/[id]/page.tsx`.
The Auth Service has fully removed the legacy "network" org-membership concept in favor of groups. Nothing crashes in Nexus as a result, but two things are now permanently dead and should be cleaned up.
## 1. "Current Access" panel will permanently show "No network roles assigned"
`src/app/(dashboard)/system/users/[id]/page.tsx` and `src/app/(dashboard)/system/team-members/[memberId]/page.tsx` read `user.networks` from `GET /users/:id` to render the "Networks" section of a "Current Access" panel. That field is no longer returned by the Auth Service, so the section will now permanently render its empty state.
**Fix:** remove the "Networks" section from both pages' "Current Access" panel.
## 2. Dead exports in `src/shared/hooks/useRBAC.ts`
`hasPermissionInNetwork`, `hasRoleInNetwork`, and `getUserNetworks` have zero call sites anywhere in Nexus (confirmed via a full audit).
**Fix:** delete these three exports whenever convenient.
## Priority
Not urgent — backlog cleanup, no user-facing errors or broken functionality.
Beitragsleitfaden
Rechercherichtung
Open src/app/(dashboard)/system/users/[id]/page.tsx and src/app/(dashboard)/system/team-members/[memberId]/page.tsx, then inspect src/shared/hooks/useRBAC.ts and search for the named network exports. Done means the Networks sections and three unused exports are removed, with no remaining call sites for those exports.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- frontend
- Issue-Typ
- Refactoring
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Aktiv
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 52/100