-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
52 lines (44 loc) · 810 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
49
50
51
52
import { Timestamp } from "firebase/firestore";
export enum ButtonType {
primary = "primary",
secondary = "secondary",
}
export enum FilterType {
category = "category",
search = "search",
}
export type Product = {
id: number;
title: string;
price: number;
description: string;
category: string;
image: string;
rating: {
rate: number;
count: number;
};
};
export type CartItem = Product & {
quantity: number;
};
export type CartState = {
items: CartItem[];
totalQuantity: number;
totalAmount: number;
};
export type WishlistState = {
items: Product[];
};
export type OrderItem = {
image: string;
price: number;
quantity: number;
title: string;
};
export type Order = {
id: string;
amount: number;
products: OrderItem[];
timestamp: Timestamp;
};