Skip to content

Commit

Permalink
Merge pull request #4465 from navikt/bugfix/suspense
Browse files Browse the repository at this point in the history
wrap suspense query in <Suspense>
  • Loading branch information
sondrele authored Oct 10, 2024
2 parents 3f4cf12 + cc1b61a commit a7c3fb7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import { TiltaksgjennomforingSkjemaKnapperad } from "./TiltaksgjennomforingSkjem
import { logEvent } from "@/logging/amplitude";
import { RedaksjoneltInnholdBunnKnapperad } from "@/components/redaksjoneltInnhold/RedaksjoneltInnholdBunnKnapperad";
import { TabWithErrorBorder } from "../skjema/TabWithErrorBorder";
import { useCallback } from "react";
import React, { useCallback } from "react";
import { Laster } from "@/components/laster/Laster";
import { InlineErrorBoundary } from "@mr/frontend-common";

interface Props {
onClose: () => void;
Expand Down Expand Up @@ -174,10 +176,14 @@ export function TiltaksgjennomforingSkjemaContainer({
/>
</Tabs.List>
<Tabs.Panel value="detaljer">
<TiltaksgjennomforingSkjemaDetaljer
avtale={avtale}
tiltaksgjennomforing={tiltaksgjennomforing}
/>
<InlineErrorBoundary>
<React.Suspense fallback={<Laster tekst="Laster innhold" />}>
<TiltaksgjennomforingSkjemaDetaljer
avtale={avtale}
tiltaksgjennomforing={tiltaksgjennomforing}
/>
</React.Suspense>
</InlineErrorBoundary>
</Tabs.Panel>
<Tabs.Panel value="redaksjonelt-innhold">
<TiltakgjennomforingRedaksjoneltInnholdForm avtale={avtale} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { SkjemaKolonne } from "@/components/skjema/SkjemaKolonne";
import { VertikalSeparator } from "@/components/skjema/VertikalSeparator";
import { KontaktpersonButton } from "@/components/kontaktperson/KontaktpersonButton";
import { isKursTiltak } from "@mr/frontend-common/utils/utils";
import { useFeatureToggle } from "../../api/features/useFeatureToggle";
import { useFeatureToggle } from "@/api/features/useFeatureToggle";
import { TiltaksgjennomforingUtdanningskategorierSkjema } from "../utdanning/TiltaksgjennomforingUtdanningskategorierSkjema";

interface Props {
Expand Down

0 comments on commit a7c3fb7

Please sign in to comment.