Skip to content

Commit 0ee3537

Browse files
committed
fix: remove conditional useEffect
1 parent 0d84ba7 commit 0ee3537

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Configuration/webapp/app/routes/configuration.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ const ConfigurationPage = () => {
5757
console.log(getValues());
5858
};
5959

60+
useEffect(() => () => reset(defaultValues), [defaultValues]);
61+
6062
if (isConfigurationLoading || isConfigurationRestrictionsLoading) {
6163
return <Spinner />;
6264
}
@@ -65,7 +67,6 @@ const ConfigurationPage = () => {
6567
return 'Error while loading data from the server';
6668
}
6769

68-
useEffect(() => () => reset(defaultValues), [defaultValues]);
6970

7071
return (
7172
<>

0 commit comments

Comments
 (0)