Initial commit
This commit is contained in:
12
resources/js/stores/contestRefreshStore.tsx
Normal file
12
resources/js/stores/contestRefreshStore.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { create } from "zustand";
|
||||
|
||||
type ContestRefreshStore = {
|
||||
refreshKey: number;
|
||||
triggerRefresh: () => void;
|
||||
};
|
||||
|
||||
export const useContestRefreshStore = create<ContestRefreshStore>((set) => ({
|
||||
refreshKey: 0,
|
||||
triggerRefresh: () =>
|
||||
set((s) => ({ refreshKey: s.refreshKey + 1 })),
|
||||
}));
|
||||
Reference in New Issue
Block a user