Skip to content

Feat/464 react query hooks users settings#513

Merged
yusuftomilola merged 2 commits intoDistinctCodes:mainfrom
mijinummi:feat/464-react-query-hooks-users-settings
Feb 25, 2026
Merged

Feat/464 react query hooks users settings#513
yusuftomilola merged 2 commits intoDistinctCodes:mainfrom
mijinummi:feat/464-react-query-hooks-users-settings

Conversation

@mijinummi
Copy link
Contributor

@mijinummi mijinummi commented Feb 23, 2026

Closes #464


React Query Hooks for Users and Settings (#464)

Objective

  • Implement React Query hooks for user management and profile updates.

Changes

  • Added useUsersList() → GET /api/users.
  • Added useUpdateUserRole() → PATCH /api/users/:id/role (invalidates user list).
  • Added useUpdateProfile() → PATCH /api/users/:id (updates Zustand store on success).
  • Added useReportsSummary() → GET /api/reports/summary.
  • Exported TypeScript types for reuse.

Acceptance Criteria

  • ✅ Role change reflected in users table without reload.
  • ✅ Profile update reflected in sidebar immediately.
  • ✅ Types exported for reuse.

@vercel
Copy link

vercel bot commented Feb 23, 2026

@mijinummi is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@yusuftomilola yusuftomilola merged commit e9c5d0a into DistinctCodes:main Feb 25, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Frontend] Implement React Query Hooks for Users and Settings

2 participants