Skip to content

Commit

Permalink
fix(frontend): ignore eslint rules for SettingsField.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
634750802 committed Jul 30, 2024
1 parent 9abb03c commit 593b583
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/app/src/components/settings/SettingsField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export function SettingsField ({ name, item, arrayItemSchema, objectSchema, chil
}
}

// eslint-disable-next-line react-hooks/rules-of-hooks
const schema = useMemo(() => {
let schema: ZodType;
switch (item.data_type) {
Expand Down Expand Up @@ -80,6 +81,7 @@ export function SettingsField ({ name, item, arrayItemSchema, objectSchema, chil
return z.object({ value: schema });
}, [item.data_type, arrayItemSchema, objectSchema]);

// eslint-disable-next-line react-hooks/rules-of-hooks
const form = useForm({
resolver: zodResolver(schema),
values: {
Expand All @@ -90,6 +92,7 @@ export function SettingsField ({ name, item, arrayItemSchema, objectSchema, chil
},
});

// eslint-disable-next-line react-hooks/rules-of-hooks
const Control = useCallback(({ field: { ...props } }: { field: ControllerRenderProps }) => {
let el: ReactNode;

Expand Down

0 comments on commit 593b583

Please sign in to comment.