-
Notifications
You must be signed in to change notification settings - Fork 0
/
typings.d.ts
177 lines (164 loc) · 3.4 KB
/
typings.d.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
interface SanityBody {
_createdAt: string;
_id: string;
_rev: string;
_updatedAt: string;
}
interface Image {
_type: "image";
_id: string;
_key: string;
asset: {
_ref: string;
_type: "reference";
};
}
interface SanityImageAssetDocument {
_id: string;
_type: string;
}
interface Geopoint {
_type: "geopoint";
asset: {
lat: string;
lng: string;
};
}
export interface EventTyping extends SanityBody {
_type: "Event";
image: Image;
title: string;
location: string;
shortDesc: string;
longDesc: string;
geopoint: Geopoint;
dateTime: Date;
}
export interface ProductTyping extends SanityBody {
_type: "Product";
image: Image[]; // Changed from Image to Image[]
photographer: PhotographerTyping;
name: string;
slug: {
current: string;
_type: string;
};
price: number;
quantity: number;
details: string;
size: string;
dimensions: string;
tags: Array<any>; // Updated Array type, you may replace 'any' with the appropriate type for tags
}
export interface PhotographerTyping extends SanityBody {
_id: string;
_type: "Photographer";
_ref: string;
image: string[];
name: string;
slug: {
current: string;
_type: string;
};
bio: string;
question1: string;
answer1: string;
question2: string;
answer2: string;
question3: string;
answer3: string;
location: string;
favoriteCamera: string;
instagram: string;
}
export interface BannerDataTyping extends SanityBody {
_type: "BannerData";
buttonText: string;
desc: string;
details: string;
discount: string;
image: string;
largeText1: string;
largeText2: string;
midText: string;
product: string;
saleTime: string;
smallText: string;
}
export interface SideBannerDataTyping extends SanityBody {
_type: "SideBannerData";
image: string;
title: string;
}
export interface AboutTyping extends SanityBody {
_type: "About";
mickImage: string;
patImage: string;
jimmyImage: string;
}
export interface MerchTyping extends SanityBody {
_type: "Merch";
image: Image[];
name: string;
description: string;
slug: {
current: string;
_type: string;
};
price: number;
size: string;
}
export interface CartTyping {
cartItems: {
_type: "Product";
image: Image;
name: string;
slug: string;
price: number;
details: string;
quantity: number;
}[];
}
export interface SubmissionsTyping {
_type: string;
submissionType: string;
firstName: string;
lastName: string;
email: string;
instagramHandle: string;
notes: string;
// image: {
// _type: string;
// asset: {
// _type: string;
// _ref: string;
// };
// };
}
export interface ContextTyping {
showCart: boolean;
cartItems: ProductTyping[];
totalPrice: number;
totalQuantities: number;
qty: number;
toggleNavDrawer: boolean;
toggleCartDrawer: boolean;
increaseQuantity: (product: ProductTyping) => void;
decreaseQuantity: (product: ProductTyping) => void;
increaseMerchQuantity: (merch: MerchTyping) => void;
decreaseMerchQuantity: (merch: MerchTyping) => void;
setTotalPrice: (totalPrice: number) => void;
setCartItems: (cartItems: ProductTyping[]) => void;
setToggleNavDrawer: (toggleDrawer: boolean) => void;
setToggleCartDrawer: (toggleDrawer: boolean) => void;
setShowCart: (showCart: boolean) => void;
onAdd: (
product: ProductTyping,
size: string,
dimensions: string,
price: number
) => void;
onAddMerch: (merch: MerchTyping) => void;
onRemoveMerch: (merch: MerchTyping) => void;
onRemove: (product: ProductTyping) => void;
}