Skip to content

Commit

Permalink
r - wip
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldlin committed Jan 9, 2025
1 parent 526b807 commit 5054374
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/KortKategorierContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ValgtKategoriProvider = ({children}: {children: React.ReactNode}) =
setKategoriDataState((prevData) => ({
...prevData,
...data,
valgtKategorier: data.valgtKategorier || "kort|annet", // Always ensure fallback
valgtKategorier: data.valgtKategorier || "annet|annet", // Always ensure fallback
}));
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const ForhandsvisningVedleggModal = ({
};

const handleClose = () => {
setValgtKategoriData({valgtKategorier: "kort|annet"}); // Reset context
setValgtKategoriData({valgtKategorier: "annet|annet"}); // Reset context
setSelectedCategory(""); // Reset local state
onClose();
};
Expand Down

0 comments on commit 5054374

Please sign in to comment.