tasko/hooks/use-pro-modal.ts

14 lines
289 B
TypeScript
Raw Normal View History

2024-02-15 02:30:10 +00:00
import { create } from "zustand";
type ProModalStore = {
isOpen: boolean;
onOpen: () => void;
onClose: () => void;
};
export const useProModal = create<ProModalStore>((set) => ({
isOpen: false,
onOpen: () => set({ isOpen: true }),
onClose: () => set({ isOpen: false }),
}));