priceContact added
This commit is contained in:
22
store/useProceModalStore.ts
Normal file
22
store/useProceModalStore.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { create } from 'zustand';
|
||||
|
||||
interface Product {
|
||||
id: number;
|
||||
name: string;
|
||||
image: string;
|
||||
inStock: boolean;
|
||||
}
|
||||
|
||||
interface PriceModalStore {
|
||||
isOpen: boolean;
|
||||
product: Product | null;
|
||||
openModal: (product: Product) => void;
|
||||
closeModal: () => void;
|
||||
}
|
||||
|
||||
export const usePriceModalStore = create<PriceModalStore>((set) => ({
|
||||
isOpen: false,
|
||||
product: null,
|
||||
openModal: (product) => set({ isOpen: true, product }),
|
||||
closeModal: () => set({ isOpen: false, product: null }),
|
||||
}));
|
||||
Reference in New Issue
Block a user