Skip to content

Commit

Permalink
add id to form
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Feb 27, 2024
1 parent 61db824 commit 867e8ec
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ interface ConnectModalComponentProps extends ConnectModalProps {
isValid: boolean
values: ConnectFormValues
control: Control<ConnectFormValues, any>
id: string
}

export const ConnectModal = (props: ConnectModalProps): JSX.Element => {
Expand Down Expand Up @@ -60,14 +61,16 @@ export const ConnectModal = (props: ConnectModalProps): JSX.Element => {
})

const values = getValues()
const id = `ConnectForm__${props.robotName}`

Check warning on line 64 in app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/index.tsx

View check run for this annotation

Codecov / codecov/patch

app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/index.tsx#L63-L64

Added lines #L63 - L64 were not covered by tests

return (
<form onSubmit={handleSubmit(onSubmit)}>
<form onSubmit={handleSubmit(onSubmit)} id={id}>
<ConnectModalComponent
{...props}
control={control}
values={values}
isValid={isValid}
id={id}
/>
</form>
)
Expand All @@ -84,10 +87,10 @@ export const ConnectModalComponent = (
onCancel,
values,
isValid,
id,
control,
} = props

Check warning on line 92 in app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/index.tsx

View check run for this annotation

Codecov / codecov/patch

app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/index.tsx#L92

Added line #L92 was not covered by tests

const id = `ConnectForm__${robotName}`
const fields = getConnectFormFields(
network,
robotName,
Expand Down

0 comments on commit 867e8ec

Please sign in to comment.