Skip to content

Commit

Permalink
Sikre at verdi er satt med en gagn i stedet for at useRouteNavigation…
Browse files Browse the repository at this point in the history
… må rendre som fucker opp alt (#6054)
  • Loading branch information
sebassonav authored Oct 21, 2024
1 parent 9539e88 commit 5465449
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ const routeTypes = {
}

function useRouteNavigation() {
const [currentRoute, setCurrentRoute] = useState<string | undefined>()
const navigate = useNavigate()
const match = useMatch('/behandling/:behandlingId/:section')
const [currentRoute, setCurrentRoute] = useState<string | undefined>(match?.params?.section)
const navigate = useNavigate()

useEffect(() => {
setCurrentRoute(match?.params?.section)
Expand Down

0 comments on commit 5465449

Please sign in to comment.