This repository was archived by the owner on Feb 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import type { OptionType } from "common/types/common" ;
66import { IconArrowLeft , IconArrowRight } from "hds-react" ;
77import { useFormContext } from "react-hook-form" ;
8- import React from "react" ;
8+ import React , { useState } from "react" ;
99import { Trans , useTranslation } from "next-i18next" ;
1010import styled from "styled-components" ;
1111import { fontMedium , fontRegular } from "common/src/common/typography" ;
@@ -75,7 +75,7 @@ const Step0 = ({
7575} : Props ) : JSX . Element => {
7676 const { t } = useTranslation ( ) ;
7777
78- const [ isDialogOpen , setIsDialogOpen ] = React . useState ( false ) ;
78+ const [ isDialogOpen , setIsDialogOpen ] = useState ( false ) ;
7979
8080 const termsOfUse = getTranslation ( reservationUnit , "termsOfUse" ) ;
8181
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ function ReservationUnitReservation(props: PropsNarrowed): JSX.Element | null {
174174 // TODO is defaultValues correct? it's prefilled from the profile data and we are not refetching at any point.
175175 // If we would refetch values would be more correct with reset hook.
176176 // Also if this is ever initialised without the data it will not prefill the form.
177- const form = useForm < Inputs > ( { defaultValues, mode : "onBlur " } ) ;
177+ const form = useForm < Inputs > ( { defaultValues, mode : "onChange " } ) ;
178178 const { handleSubmit, watch } = form ;
179179
180180 const reserveeType = watch ( "reserveeType" ) ;
You can’t perform that action at this time.
0 commit comments