13 lines
296 B
TypeScript
13 lines
296 B
TypeScript
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 })),
|
|
}));
|