Skip to content

Commit

Permalink
Clear testing site
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaagma committed Nov 6, 2024
1 parent 0766c8c commit 0c94974
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,11 @@ export const ProgramSelection: FC<FieldBaseProps> = ({ application }) => {
programInfo && getProgramNameAndExtra(programInfo),
)

// set default mode of delivery
// set default mode of delivery (or clear selection)
updateDefaultModeOfDelivery(programInfo)

// clear testing site selection
clearModeOfDeliveryTestingSite()
}

const updateDefaultModeOfDelivery = (program: Program | undefined) => {
Expand All @@ -188,6 +191,10 @@ export const ProgramSelection: FC<FieldBaseProps> = ({ application }) => {
}
}

const clearModeOfDeliveryTestingSite = () => {
setValue(`${Routes.MODEOFDELIVERYINFORMATION}.location`, '')
}

const getProgramNameAndExtra = (program: Program) => {
const extra =
lang === 'is' && program
Expand Down

0 comments on commit 0c94974

Please sign in to comment.