Skip to content

Commit

Permalink
fix(regulations-admin): Update draft impact default date (#16204)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
thordurhhh and kodiakhq[bot] authored Sep 30, 2024
1 parent a2c87aa commit 23d2802
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import { DraftRegulationChange } from '@island.is/regulations/admin'
import { useLocale } from '@island.is/localization'
import { cleanTitle } from '@island.is/regulations-tools/cleanTitle'
import { errorMsgs as msg } from '../../lib/messages'
import { getWorkdayMinimumDate } from '../../utils'

/* ---------------------------------------------------------------------------------------------------------------- */

Expand Down Expand Up @@ -197,7 +198,7 @@ export const EditChange = (props: EditChangeProp) => {
!regulationLoading &&
toISODate(minDate) !== toISODate(activeChange.date.value)
) {
changeDate(minDate)
changeDate(getWorkdayMinimumDate(10))
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [minDate, impactsLoading, regulationLoading])
Expand Down

0 comments on commit 23d2802

Please sign in to comment.