Skip to content

Commit

Permalink
HAI-2057 removed unnecessary useEffect for Hanke vaihe
Browse files Browse the repository at this point in the history
  • Loading branch information
umeetiusbaar committed Oct 24, 2023
1 parent 2db10e4 commit 2ab5811
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/domain/hanke/edit/HankeFormPerustiedot.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect } from 'react';
import React from 'react';
import { useTranslation, Trans } from 'react-i18next';
import { Tooltip, TextArea, SelectionGroup, RadioButton } from 'hds-react';
import { $enum } from 'ts-enum-util';
Expand All @@ -20,13 +20,12 @@ const HankeFormPerustiedot: React.FC<React.PropsWithChildren<FormProps>> = ({
formData,
}) => {
const { t } = useTranslation();
const { watch, setValue } = useFormContext();
const { watch } = useFormContext();
const { JOHTOSELVITYSHAKEMUS } = useLocalizedRoutes();
useFormPage();

// Subscribe to vaihe changes in order to update the selected radio button
const hankeVaiheField = watch(FORMFIELD.VAIHE);
useEffect(() => {}, [hankeVaiheField, setValue]);

return (
<div className="form0">
Expand Down

0 comments on commit 2ab5811

Please sign in to comment.