Title: feat: build user profile settings page (#8)#43
Merged
Conversation
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.
Body:
Summary
/settings/profileroute with a fully functional profile editing formuseProfileFormhook (React Hook Form + Zod) with mock save handler, dirty-state tracking, and cancel-to-last-saved behaviourSettingsNavclient component that highlights the active tab viausePathname()What's included
New files
src/app/(dashboard)/settings/profile/page.tsx— route entry pointsrc/components/settings/ProfileForm.tsx— two-column settings-row layout (label + description left, control right) with a live profile preview card at the topsrc/components/settings/SettingsNav.tsx— client component for active-tab detectionsrc/hooks/useProfileForm.ts— form state, Zod validation, mock save (900 ms delay), and cancel resetModified files
src/app/(dashboard)/settings/layout.tsx— dark header, page subtitle, usesSettingsNavsrc/lib/validations/profile.ts— replacedwebsitefield withavatarUrl(URL format validated)Acceptance criteria checklist
/settings/profilerenders inside the existing dashboard shellmdbreakpointnpm run lintandtsc --noEmitpass with zero errorsNotes
useProfileForm.tsis a mock (setTimeout900 ms). Swap thetryblock body for a real API call when the backend endpoint is ready — the loading/success/error states are already wired up.next/imageis used for the avatar preview to satisfy the@next/next/no-img-elementlint rule. External image domains will need to be allow-listed innext.configonce real URLs are in use.