Skip to content

Commit

Permalink
Liten refaktor på MiljoVelger
Browse files Browse the repository at this point in the history
#deploy-idporten-frontend
  • Loading branch information
stigus committed Mar 21, 2024
1 parent aa63c54 commit adbba8d
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ export const MiljoVelger = ({

const onClick = (e) => {
const { id } = e.target
console.log('id: ', id) //TODO - SLETT MEG
console.log('alleredeValgtMiljoe: ', alleredeValgtMiljoe) //TODO - SLETT MEG
console.log('e: ', e) //TODO - SLETT MEG
if (!alleredeValgtMiljoe?.includes(id)) {
if (alleredeValgtMiljoe?.includes(id) && values.includes(id)) {
console.warn('Miljøet er påkrevd')
} else {
formMethods.setValue(
'environments',
isChecked(id) ? values.filter((value) => value !== id) : values.concat(id),
Expand Down

0 comments on commit adbba8d

Please sign in to comment.