-
Notifications
You must be signed in to change notification settings - Fork 0
Allow editing the user's profile #535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow editing the user's profile #535
Conversation
- Implement profile edit page with form validation and submission - Add loading and error states for profile edit page - Create profile edit routes, layout, and loading components - Enhance Verida profile update functionality with hooks and utils - Update profile card with edit profile button - Refactor profile-related schemas and types
- Rename `useUpdateProfile` hook to `useUpdateVeridaProfile` - Add optimistic updates and better error handling for profile updates - Create `VeridaProfileQueryKeys` for consistent query key management - Enhance profile retrieval with `getVeridaProfileFromWebUser` - Simplify profile update utility function parameters - Add more robust error handling and logging in profile-related utilities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request enables editing of the user's profile by introducing a new hook for updating the profile with optimistic updates and adding dedicated pages and layouts for profile editing.
- Implements a new useUpdateVeridaProfile hook for updating profiles with optimistic updates.
- Adds loading, layout, error, and edit pages to support profile editing.
- Updates schema definitions, query keys, utility functions, and UI components to integrate the new profile editing functionality.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/features/verida-profile/hooks/use-update-verida-profile.ts | Adds a new hook for updating the profile with optimistic updates. |
src/app/(connected)/profile/edit/loading.tsx | Creates a loading page for the profile editor. |
src/app/(connected)/profile/edit/layout.tsx | Introduces a layout component for the profile edit page. |
src/app/(connected)/profile/edit/error.tsx | Provides an error page component for the profile editor. |
src/features/verida-profile/utils.ts | Refactors profile retrieval and updating functions. |
src/features/verida-profile/schemas.ts | Updates and adds schemas for profile data and form handling. |
src/app/(connected)/profile/edit/page.tsx | Implements the profile edit page with a form based on the new schema. |
src/features/verida-profile/queries.ts | Introduces query keys for profile data caching and invalidation. |
src/features/verida-profile/components/profile-card.tsx | Adds an Edit Profile link in the profile card. |
src/features/verida-profile/hooks/use-verida-profile.ts | Updates the profile hook to use new retrieval functions and query keys. |
src/features/verida-profile/types.ts | Updates type definitions to reflect schema changes. |
src/features/verida-database/hooks/use-update-verida-record.ts | Adjusts type context for record update hooks. |
src/features/routes/utils.ts | Adds a route helper for the profile edit page. |
src/app/(connected)/profile/page.tsx | Minor text update for consistency in profile messages. |
src/app/(connected)/profile/loading.tsx | Minor text update for consistency in profile messages. |
src/components/verida/verida-identity-dropdown-menu.tsx | Removes unused imports in the dropdown menu component. |
This pull request is automatically being deployed by Amplify Hosting (learn more). |
No description provided.