@@ -14,10 +14,20 @@ function getUrlWithBackToParam<TUrl extends string>(url: TUrl, backTo?: string):
14
14
return `${ url } ${ backToParam } ` as const ;
15
15
}
16
16
17
- const ROUTES = {
17
+ const PUBLIC_SCREENS_ROUTES = {
18
18
// If the user opens this route, we'll redirect them to the path saved in the last visited path or to the home page if the last visited path is empty.
19
19
ROOT : '' ,
20
+ TRANSITION_BETWEEN_APPS : 'transition' ,
21
+ CONNECTION_COMPLETE : 'connection-complete' ,
22
+ VALIDATE_LOGIN : 'v/:accountID/:validateCode' ,
23
+ UNLINK_LOGIN : 'u/:accountID/:validateCode' ,
24
+ APPLE_SIGN_IN : 'sign-in-with-apple' ,
25
+ GOOGLE_SIGN_IN : 'sign-in-with-google' ,
26
+ SAML_SIGN_IN : 'sign-in-with-saml' ,
27
+ } as const ;
20
28
29
+ const ROUTES = {
30
+ ...PUBLIC_SCREENS_ROUTES ,
21
31
// This route renders the list of reports.
22
32
HOME : 'home' ,
23
33
@@ -53,18 +63,11 @@ const ROUTES = {
53
63
getRoute : ( accountID : string | number ) => `a/${ accountID } /avatar` as const ,
54
64
} ,
55
65
56
- TRANSITION_BETWEEN_APPS : 'transition' ,
57
- VALIDATE_LOGIN : 'v/:accountID/:validateCode' ,
58
- CONNECTION_COMPLETE : 'connection-complete' ,
59
66
GET_ASSISTANCE : {
60
67
route : 'get-assistance/:taskID' ,
61
68
getRoute : ( taskID : string , backTo : string ) => getUrlWithBackToParam ( `get-assistance/${ taskID } ` , backTo ) ,
62
69
} ,
63
- UNLINK_LOGIN : 'u/:accountID/:validateCode' ,
64
- APPLE_SIGN_IN : 'sign-in-with-apple' ,
65
- GOOGLE_SIGN_IN : 'sign-in-with-google' ,
66
70
DESKTOP_SIGN_IN_REDIRECT : 'desktop-signin-redirect' ,
67
- SAML_SIGN_IN : 'sign-in-with-saml' ,
68
71
69
72
// This is a special validation URL that will take the user to /workspace/new after validation. This is used
70
73
// when linking users from e.com in order to share a session in this app.
@@ -876,7 +879,7 @@ const HYBRID_APP_ROUTES = {
876
879
MONEY_REQUEST_SUBMIT_CREATE : '/submit/new/scan' ,
877
880
} as const ;
878
881
879
- export { HYBRID_APP_ROUTES , getUrlWithBackToParam } ;
882
+ export { HYBRID_APP_ROUTES , getUrlWithBackToParam , PUBLIC_SCREENS_ROUTES } ;
880
883
export default ROUTES ;
881
884
882
885
// eslint-disable-next-line @typescript-eslint/no-explicit-any
0 commit comments