diff --git a/apps/mobile/components/category/category-form.tsx b/apps/mobile/components/category/category-form.tsx index d2dd1268..0367d93f 100644 --- a/apps/mobile/components/category/category-form.tsx +++ b/apps/mobile/components/category/category-form.tsx @@ -46,11 +46,14 @@ export const CategoryForm = ({ // biome-ignore lint/correctness/useExhaustiveDependencies: 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')