mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-06-23 12:54:21 +00:00
Initial Commit
This commit is contained in:
commit
f3e2f01bd7
150 changed files with 13612 additions and 0 deletions
15
hooks/use-card-modal.ts
Normal file
15
hooks/use-card-modal.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { create } from "zustand";
|
||||
|
||||
type CardModalStore = {
|
||||
id?: string;
|
||||
isOpen: boolean;
|
||||
onOpen: (id: string) => void;
|
||||
onClose: () => void;
|
||||
};
|
||||
|
||||
export const useCardModal = create<CardModalStore>((set) => ({
|
||||
id: undefined,
|
||||
isOpen: false,
|
||||
onOpen: (id: string) => set({ isOpen: true, id }),
|
||||
onClose: () => set({ isOpen: false, id: undefined }),
|
||||
}));
|
Loading…
Add table
Add a link
Reference in a new issue