Skip to content

Commit 8ee05c1

Browse files
committed
chore(deps): update jotai to v2
1 parent 541f616 commit 8ee05c1

File tree

5 files changed

+13
-42
lines changed

5 files changed

+13
-42
lines changed

components/userContext/SelectOrganisation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const SelectOrganisation = (props: SelectOrganisationProps) => {
6464
// Not the best solution but I couldn't figure out anything better
6565
if (newOrganisation?.id !== organisation?.id) {
6666
setCurrentProjectId();
67-
setUnit();
67+
setUnit(undefined);
6868
writeToLocalStorage(PROJECT_LOCAL_STORAGE_KEY, projectPayload(undefined));
6969
}
7070

features/userSettings/UserSettingsContent/ContextSection/contextActions/UnitActions.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ export const UnitActions = () => {
1919

2020
return (
2121
<List sx={{ width: "100%" }}>
22-
{isUnitOwner && unit && <DeleteUnitListItem unit={unit} onDelete={() => setUnit()} />}
22+
{isUnitOwner && unit && (
23+
<DeleteUnitListItem unit={unit} onDelete={() => setUnit(undefined)} />
24+
)}
2325
{isUnitOwner && unit && organisation?.name !== "Default" && <EditUnitListItem unit={unit} />}
2426
{unit && <CreateProjectListItem unit={unit} />}
2527
</List>

layouts/navigation/UserMenuContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export const UserMenuContent = () => {
2929
href={`${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/api/auth/logout`}
3030
onClick={() => {
3131
localStorage.clear();
32-
setUnit();
33-
setOrganisation();
32+
setUnit(undefined);
33+
setOrganisation(undefined);
3434
}}
3535
>
3636
Logout

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"formik-mui": "4.0.0",
7575
"formik-mui-lab": "1.0.0",
7676
"immer": "9.0.19",
77-
"jotai": "1.13.1",
77+
"jotai": "2.0.3",
7878
"just-compare": "2.3.0",
7979
"just-group-by": "2.2.0",
8080
"ketcher-core": "2.7.2",

pnpm-lock.yaml

Lines changed: 6 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)