tasko/hooks/use-pro-modal.ts

14 lines
289 B
TypeScript
Raw Permalink Normal View History

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