forked from MANOJPATRA1991/food-delivery-app-react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.tsx
55 lines (47 loc) · 1.1 KB
/
types.tsx
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
import { LatLng } from "react-native-maps";
import { icons } from "./constants";
export type RootTabParamList = {
Home: undefined;
Restaurant: { item: Restaurant; currentLocation: CurrentLocation };
OrderDelivery: {
restaurant: Restaurant | null;
currentLocation: CurrentLocation | null;
};
Search: undefined;
Profile: undefined;
};
export interface ScreenTab {
screenName: string;
screenComponent: any;
screenIcon: keyof typeof icons;
}
export type CurrentLocation = { streetName: string; gps: LatLng };
export type CategoryData = { id: number; name: string; icon: any };
export type Courier = { avatar: any; name: string };
export type Menu = {
menuId: number;
name: string;
photo: any;
description: string;
calories: number;
price: number;
};
export type Restaurant = {
id: number;
name: string;
rating: number;
categories: number[];
categoryNames?: string[];
priceRating: number;
photo: any;
duration: string;
location: LatLng;
courier: Courier;
menu: Menu[];
};
export type OrderItem = {
menuId: number;
qty: number;
price: number;
total: number;
};