Skip to content

Commit f2eaf9b

Browse files
committed
fix: update dependencies in useEffect hooks for StepThree and SelectDropdown components
1 parent 4418799 commit f2eaf9b

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

components/Form/Cfp/stepThree.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ function StepThree({ setStep, setForm, data }: CfpStepProps): JSX.Element {
3535

3636
useEffect(() => {
3737
setForm({ ...data, ...value });
38-
// eslint-disable-next-line react-hooks/exhaustive-deps
39-
}, [value]);
38+
}, [value, data, setForm]);
4039

4140
return (
4241
<form className="mt-3" onSubmit={(e) => setStep(e, 4)}>

components/Select/select.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ function SelectDropdown({
5353
if (selectedOption?.value) {
5454
setValue(selectedOption.value);
5555
}
56-
// eslint-disable-next-line react-hooks/exhaustive-deps
57-
}, [selectedOption]);
56+
}, [selectedOption, setValue]);
5857
return (
5958
<div className="relative inline-block w-full">
6059
<Select

0 commit comments

Comments
 (0)