-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.ts
38 lines (31 loc) · 938 Bytes
/
utils.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
import axios from 'axios'
export enum screens {
QR = 'qr',
SEARCH = 'search',
PROFILE = 'profile',
LOGIN = 'login',
SIGNUP = 'signup'
}
export type ParamList = {
[screens.QR]: undefined,
[screens.SEARCH]: {id: string} | undefined,
[screens.PROFILE]: undefined,
[screens.LOGIN]: undefined,
[screens.SIGNUP]: undefined
}
export const links: {[k in screens]: string} = {
[screens.QR]: 'qr',
[screens.SEARCH]: 'search/:id?',
[screens.PROFILE]: 'profile',
[screens.LOGIN]: 'account/login',
[screens.SIGNUP]: 'account/signup'
}
export const WIDTH_THRESHOLD = 768
export type GenericObject = {
[key: string]: any
}
export const configureAxios = () => {
axios.defaults.baseURL = 'https://emergencycontactbackend.vedantyadu.online'
axios.defaults.withCredentials = true
}
export const defaultprofilepicture = 'https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_960_720.png'