Skip to content

Commit

Permalink
fix(mobile): [Wallet] fix wrong icon when edit wallet account (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkdev98 authored Jul 14, 2024
1 parent b8e1f83 commit 7800aed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/mobile/components/category/category-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ export const CategoryForm = ({

// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
useEffect(() => {
if (defaultValues?.icon) {
return
}
categoryForm.setValue(
'icon',
type === 'INCOME' ? CATEGORY_INCOME_ICONS[0] : CATEGORY_EXPENSE_ICONS[0],
)
}, [type])
}, [type, defaultValues?.icon])

const isTypeHidden = hiddenFields.includes('type')

Expand Down

0 comments on commit 7800aed

Please sign in to comment.