-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtypes.ts
48 lines (41 loc) · 967 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { Menu } from "@prisma/client";
export type PromoTypes = {
title: string;
img: string;
salesQ: number;
likesN: number;
PercentOff: number;
price: number;
};
export type CustomCategory = {
desc: string;
id: string;
category: string;
imageSrc: string;
};
export type LoginModalStore = {
isOpen: boolean;
onOpen: () => void;
onClose: () => void;
};
export type SideBarDrawerStore = {
isSideBarOpen: boolean;
onSideBarOpen: () => void;
onSideBarClose: () => void;
};
type CartOptions = {
quantity: number;
instructions: string;
prepare: string;
};
export type CartItemType = Menu & CartOptions;
export type CartType = {
menus: CartItemType[];
};
export type CartActionTypes = {
addToCart: (item: CartItemType) => void;
deleteFromcart: (id: string) => void;
increaseCartItem: (data: CartItemType[], id: string) => void;
decreaseCartItem: (data: CartItemType[], id: string) => void;
resetCart: () => void;
};