feat: access to competition is blocked if it is ended

This commit is contained in:
rngsurrounded
2025-03-03 23:12:40 +09:00
parent 63f3867bc3
commit 70acce4b9f
3 changed files with 54 additions and 12 deletions
+6 -1
View File
@@ -7,6 +7,7 @@ interface UserState {
loading: boolean;
fetchUser: () => Promise<void>;
clearUser: () => void;
}
const useUserStore = create<UserState>((set) => ({
@@ -18,6 +19,10 @@ const useUserStore = create<UserState>((set) => ({
const user = await getCurrentUser();
set({ user, loading: false });
},
clearUser: () => {
set({ user: null });
},
}));
export { useUserStore };
export { useUserStore };