-
Notifications
You must be signed in to change notification settings - Fork 1
/
deeplinkConfig.ts
57 lines (55 loc) · 1.58 KB
/
deeplinkConfig.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
import { Linking } from 'react-native';
import { LinkingOptions } from '@react-navigation/native';
export const linking: LinkingOptions<RootStackParamList> = {
prefixes: ['fromnow://'],
config: {
screens: {
Home: 'home',
Profile: 'profile',
SignIn: 'signin',
Camera: 'camera',
SignupNickname: 'signup-nickname',
SignupPhoto: 'signup-photo',
MyFriend: 'my-friend/:req',
MyTeamRequest: 'my-team-request',
MyLikedBoard: 'my-liked-board',
Team: 'team/:id',
TeamCalendar: 'team-calendar',
TeamEdit: 'team-edit/:id',
TeamFriendAdd: 'team-friend-add/:id',
TeamDetail: 'team-detail/:teamId/:date',
TeamCreate: 'team-create',
BoardEdit: 'board-edit/:file',
Search: 'search',
Notice: 'notice',
PrivacyPolicy: 'privacy-policy/:showSignupPolicy',
ServicePolicy: 'service-policy/:showSignupPolicy',
},
},
async getInitialURL() {
const url = await Linking.getInitialURL();
if (url != null) return url;
},
};
type RootStackParamList = {
Home: string;
Profile: string;
SignIn: string;
Camera: string;
SignupNickname: string;
SignupPhoto: string;
MyFriend: { req?: string };
MyTeamRequest: string;
MyLikedBoard: string;
Team: { id: string };
TeamCalendar: string;
TeamEdit: { id: string };
TeamFriendAdd: { id: string };
TeamDetail: { teamId: string; date: string };
TeamCreate: string;
BoardEdit: { file: string };
Search: string;
Notice: string;
PrivacyPolicy: { showSignupPolicy: boolean };
ServicePolicy: { showSignupPolicy: boolean };
};