Skip to content

Commit

Permalink
K9-SAK-WEB-6QV - flytter hook til riktig sted (#6648)
Browse files Browse the repository at this point in the history
  • Loading branch information
hallvardastark authored Oct 2, 2024
1 parent cc7c5e0 commit 8438a4d
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ const VilkarresultatMedOverstyringProsessIndex = ({
}
}, [activeTab, visAllePerioder]);

if (perioder.length === 0) {
return null;
}

useEffect(() => {
if (perioder.length > 1) {
const førsteIkkeVurdertPeriodeIndex = perioder.findIndex(
Expand All @@ -94,6 +90,9 @@ const VilkarresultatMedOverstyringProsessIndex = ({
}
}, []);

if (perioder.length === 0) {
return null;
}
const activePeriode = perioder.length === 1 ? perioder[0] : perioder[activeTab];

return (
Expand Down

0 comments on commit 8438a4d

Please sign in to comment.