Skip to content

Commit

Permalink
fet-1340: Subname creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Lysak committed Sep 3, 2024
1 parent fdd6460 commit 790b432
Show file tree
Hide file tree
Showing 3 changed files with 292 additions and 49 deletions.
1 change: 1 addition & 0 deletions public/locales/en/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@
"empty": "No subnames have been added",
"noResults": "No results",
"noMoreResults": "No more results",
"setProfile": "Set Profile",
"addSubname": {
"title": "Subnames let you create additional names from your existing name.",
"learn": "Learn about subnames",
Expand Down
3 changes: 2 additions & 1 deletion src/hooks/useProfileEditorForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const useProfileEditorForm = (existingRecords: ProfileRecord[]) => {
SUPPORTED_AVUP_ENDPOINTS.some((endpoint) => avatar?.startsWith(endpoint))
)
if (avatarIsChanged) {
setValue('avatar', avatar, { shouldDirty: true, shouldTouch: true })
setValue('avatar', avatar || '', { shouldDirty: true, shouldTouch: true })
}
}

Expand Down Expand Up @@ -217,6 +217,7 @@ export const useProfileEditorForm = (existingRecords: ProfileRecord[]) => {
const getAvatar = () => getValues('avatar')

return {
isDirty: formState.isDirty,
records,
register,
trigger,
Expand Down
Loading

0 comments on commit 790b432

Please sign in to comment.