mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 07:27:10 +00:00
feat: access to competition is blocked if it is ended
This commit is contained in:
@@ -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 };
|
||||
Reference in New Issue
Block a user