feat(admin): build /admin/settings page for hub configuration#1318
Merged
yusuftomilola merged 2 commits intoJun 29, 2026
Merged
Conversation
|
@YaronZaki 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
approved these changes
Jun 29, 2026
|
@YaronZaki Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1102
Closes #1103
Closes #1104
Closes #1105
Builds the admin-only Hub Settings page at
/admin/settings, mirroring the existing admin pages (admin/payments,admin/announcements).Page sections
open/closetime inputs.Africa/Lagos).A single Save settings button PATCHes
/hub-settingsviauseUpdateHubSettings, shows a success toast on save, and shows the error message inline on failure.New / changed files
frontend/app/admin/settings/page.tsx(new) — the settings page itself.frontend/components/dashboard/DashboardSidebar.tsx— adds a Settings entry underadminItemsso it's reachable from the admin sidebar (page inherits the existing/admin/*middleware guard, so only admins / super_admins can reach it).frontend/lib/react-query/hooks/admin/hub-settings/useGetHubSettings.ts(new) — wraps the existingGET /hub-settingsendpoint.frontend/lib/react-query/hooks/admin/hub-settings/useUpdateHubSettings.ts(new) — wrapsPATCH /hub-settingsand invalidates the cache on success.The hooks are tiny but were required for the page to function.
Acceptance criteria coverage
frontend/app/admin/settings/page.tsxaccessible via/admin/settingsGET /hub-settingsPATCH /hub-settingswith a success / error toast