-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
52 lines (39 loc) · 825 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
type segmentType = 'men' | 'women'
type searchParamsType = {
category:string , price:string
}
type productType = {
title: string
price: number
category: string
id: number
description: string
stock: number
rating: number
images: string[]
details: string[]
}
type productsType = productType[] | []
type returnType = {
error:boolean,
products:productsType
}
type queryKeyType = 'category' | 'price'
type queryValueType = 'lth' | 'htl' | 'sweaters' | 'tshirts'
type localProductType = {
images: string[];
title: string;
price: number;
id: number;
segment: string;
styles:string
}
type localProductsType = localProductType[]
type sizesType = 's' | 'm' | 'l' | 'xl' | 'xxl'
type cartItem = {
sizes:sizesType[],
details:productType
}
type cartType = {
[key:string] : cartItem
}