forked from NWACus/avy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.ts
125 lines (117 loc) · 3.66 KB
/
routes.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
import {BottomTabNavigationProp} from '@react-navigation/bottom-tabs';
import {NavigatorScreenParams} from '@react-navigation/native';
import {NativeStackNavigationProp} from '@react-navigation/native-stack';
import {AvalancheCenterID, WeatherStationSource} from 'types/nationalAvalancheCenter';
import {RequestedTimeString} from 'utils/date';
export type TabNavigatorParamList = {
Home: NavigatorScreenParams<HomeStackParamList> & {center_id: AvalancheCenterID; requestedTime: RequestedTimeString};
'Weather Data': NavigatorScreenParams<WeatherStackParamList> & {center_id: AvalancheCenterID; requestedTime: RequestedTimeString};
Observations: NavigatorScreenParams<ObservationsStackParamList> & {center_id: AvalancheCenterID; requestedTime: RequestedTimeString};
Menu: NavigatorScreenParams<MenuStackParamList> & {center_id: AvalancheCenterID; requestedTime: RequestedTimeString};
};
export type TabNavigationProps = BottomTabNavigationProp<TabNavigatorParamList>;
type WeatherStationDetailPageProps = {
center_id: AvalancheCenterID;
zoneName: string;
name: string;
stations: Record<string, WeatherStationSource>;
requestedTime: RequestedTimeString;
};
export type HomeStackParamList = {
avalancheCenter: {
center_id: AvalancheCenterID;
requestedTime: RequestedTimeString;
};
forecast: {
zoneName: string;
center_id: AvalancheCenterID;
forecast_zone_id: number;
requestedTime: RequestedTimeString;
};
// While in the home stack, we can display these pages:
// - weather station detail
// - observation detail (nwac & nac)
stationDetail: WeatherStationDetailPageProps;
observation: {
id: string;
};
nwacObservation: {
id: string;
};
};
export type HomeStackNavigationProps = NativeStackNavigationProp<HomeStackParamList>;
export type WeatherStackParamList = {
stationList: {
center_id: AvalancheCenterID;
requestedTime: RequestedTimeString;
};
stationDetail: WeatherStationDetailPageProps;
};
export type WeatherStackNavigationProps = NativeStackNavigationProp<WeatherStackParamList>;
export type TelemetryStackParamList = {
telemetryStations: {
center_id: AvalancheCenterID;
requestedTime: RequestedTimeString;
};
telemetryStation: {
center_id: AvalancheCenterID;
source: string;
station_id: number;
name: string;
requestedTime: RequestedTimeString;
};
};
export type TelemetryStackNavigationProps = NativeStackNavigationProp<TelemetryStackParamList>;
export type ObservationsStackParamList = {
observationsPortal: {
center_id: AvalancheCenterID;
requestedTime: RequestedTimeString;
};
observationSubmit: {
center_id: AvalancheCenterID;
};
observationsList: {
center_id: AvalancheCenterID;
requestedTime: RequestedTimeString;
};
observation: {
id: string;
};
nwacObservation: {
id: string;
};
};
export type ObservationsStackNavigationProps = NativeStackNavigationProp<ObservationsStackParamList>;
export type MenuStackParamList = {
menu: undefined;
avalancheCenterSelector: {
debugMode: boolean;
};
buttonStylePreview: undefined;
textStylePreview: undefined;
avalancheComponentPreview: undefined;
toastPreview: undefined;
timeMachine: undefined;
avalancheCenter: {
center_id: AvalancheCenterID;
requestedTime: RequestedTimeString;
};
forecast: {
zoneName: string;
center_id: AvalancheCenterID;
forecast_zone_id: number;
requestedTime: RequestedTimeString;
};
observation: {
id: string;
};
nwacObservation: {
id: string;
};
about: undefined;
outcome: {
which: string;
};
expoConfig: undefined;
};
export type MenuStackNavigationProps = NativeStackNavigationProp<MenuStackParamList>;