Skip to content

Commit 8417043

Browse files
committed
chore: make session store more typesafe
1 parent 7e7f2c9 commit 8417043

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

apps/frontend/src/stores/session.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { persistentMap } from "@nanostores/persistent";
2+
import { components } from "../api.gen";
23

3-
type Session = {
4-
email?: string;
5-
role?: string;
6-
};
4+
type Session = Partial<Omit<components["schemas"]["SessionResponseDto"], "id">>;
75

86
export const $session = persistentMap<Session>("session", {});

0 commit comments

Comments
 (0)