-
Notifications
You must be signed in to change notification settings - Fork 292
Expand file tree
/
Copy pathconstants.ts
More file actions
173 lines (155 loc) Β· 5.89 KB
/
constants.ts
File metadata and controls
173 lines (155 loc) Β· 5.89 KB
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
import type { RadioItemProps } from '../components/fields/RadioItem';
declare const navigator: Navigator & { brave?: { isBrave: unknown } };
// All links are loaded via Rebrandly
export const stateOfTrust = 'https://r.daily.dev/state-of-trust';
export const faq = 'https://r.daily.dev/faqs';
export const feedback = 'https://r.daily.dev/feedback';
export const termsOfService = 'https://r.daily.dev/tos';
export const privacyPolicy = 'https://r.daily.dev/privacy-policy';
export const cookiePolicy = 'https://r.daily.dev/cookie-policy';
export const reputation = 'https://r.daily.dev/reputation';
export const ownershipGuide = 'https://r.daily.dev/claim';
export const contentGuidelines = 'https://r.daily.dev/content-guidelines';
export const companionExplainerVideo = 'https://r.daily.dev/companion-overview';
export const companionPermissionGrantedLink =
'https://r.daily.dev/try-the-companion';
export const recruiterScheduleUrl = 'https://recruiter.daily.dev/schedule';
export const initialDataKey = 'initial';
export const install = 'https://r.daily.dev/install';
export const uninstall = 'https://r.daily.dev/uninstall';
export const sharingBookmarks = 'https://r.daily.dev/sharing-bookmarks';
export const devCard = 'https://r.daily.dev/devcard-github';
export const docs = 'https://r.daily.dev/docs';
export const markdownGuide = 'https://r.daily.dev/markdown-guide';
export const careers = 'https://r.daily.dev/careers';
export const firstNotificationLink = 'https://r.daily.dev/notifications';
export const reportSquadMember = 'https://r.daily.dev/report-squad-member';
export const squadFeedback = 'https://r.daily.dev/squad-feedback';
export const downloadBrowserExtension = 'https://r.daily.dev/extension';
export const twitter = 'https://r.daily.dev/twitter';
export const slackIntegration = 'https://r.daily.dev/slack';
export const statusPage = 'https://r.daily.dev/status';
export const businessWebsiteUrl = 'https://r.daily.dev/business';
export const appsUrl = 'https://daily.dev/apps';
export const mobileAppUrl = 'https://api.daily.dev/mobile';
export const timezoneSettingsUrl = 'https://r.daily.dev/timezone';
export const isDevelopment = process.env.NODE_ENV === 'development';
export const isProductionAPI =
process.env.NEXT_PUBLIC_API_URL === 'https://api.daily.dev';
export const isProduction = process.env.NODE_ENV === 'production';
export const isTesting =
process.env.NODE_ENV === 'test' || (!isDevelopment && !isProduction);
export const isGBDevMode = process.env.NEXT_PUBLIC_GB_DEV_MODE === 'true';
export const isBrave = (): boolean => {
if (!window.Promise) {
return false;
}
return typeof navigator.brave?.isBrave === 'function';
};
export const isChrome = (): boolean =>
/Chrome/.test(globalThis?.navigator?.userAgent) &&
/Google Inc/.test(globalThis?.navigator?.vendor);
export const webappUrl = process.env.NEXT_PUBLIC_WEBAPP_URL as string;
export const onboardingUrl = `${webappUrl}onboarding`;
export const plusUrl = `${webappUrl}plus`;
export const managePlusUrl = 'https://r.daily.dev/billing';
export const plusDetailsUrl = 'https://r.daily.dev/plus-onboarding';
export const plusSuccessUrl = `${plusUrl}/success`;
export const walletUrl = `${webappUrl}wallet`;
export const settingsUrl = `${webappUrl}settings`;
export const briefingUrl = `${webappUrl}briefing`;
export const opportunityUrl = `${webappUrl}jobs`;
export const recruiterUrl = `${webappUrl}recruiter`;
export const boostOpportunityLink = 'https://r.daily.dev/boost-opportunity';
export const migrateUserToStreaks = 'https://r.daily.dev/streaks';
export const topReaderBadgeDocs = 'https://r.daily.dev/top-reader-badge';
export const plusOrganizationInfo = 'https://r.daily.dev/organizations';
export const squadCategoriesPaths = {
'My Squads': '/squads/discover/my',
discover: '/squads/discover',
featured: '/squads/discover/featured',
};
export const AD_PLACEHOLDER_SOURCE_ID = '__dailydotdev_app_ad_placeholder__';
export const emojiOptions = [
'',
'πΉ',
'π',
'βοΈ',
'π₯',
'π¦',
'βοΈ',
'π',
'π³',
'π‘',
'π',
'π',
];
export enum FeedOrder {
Recommended = 'recommended',
Date = 'date',
Upvotes = 'upvotes',
Downvotes = 'downvotes',
Comments = 'comments',
Clicks = 'clicks',
}
export const feedRangeFilters: RadioItemProps[] = [
{
label: 'All time',
value: 'all',
},
{
label: 'Past 24 hours',
value: '1',
},
{
label: 'Past week',
value: '7',
},
{
label: 'Past month',
value: '30',
},
];
/*
The list below must match the Confluence page attached
https://dailydotdev.atlassian.net/wiki/spaces/HAN/pages/1571946510/Restricted+countries+for+business+activities+aka+sanctioned+countries#Restricted-Countries-and-Regions
*/
export const invalidPlusRegions = [
'AF', // Afghanistan
'AQ', // Antarctica
'BY', // Belarus
'MM', // Burma (Myanmar)
'CF', // Central African Republic
'UA-43', // Crimea (Region of Ukraine)
'CU', // Cuba
'CD', // Democratic Republic of Congo
'UA-14', // Donetsk (Region of Ukraine)
'HT', // Haiti
'IR', // Iran
'IQ', // Iraq
'UA-65', // Kherson (Region of Ukraine)
'LB', // Lebanon
'LY', // Libya
'UA-09', // Luhansk (Region of Ukraine)
'ML', // Mali
'AN', // Netherlands Antilles
'NI', // Nicaragua
'KP', // North Korea
'RU', // Russia
'SO', // Somalia
'SS', // South Sudan
'SD', // Sudan
'SY', // Syria
'VE', // Venezuela
'YE', // Yemen
'UA-23', // Zaporizhzhia (Region of Ukraine)
'ZW', // Zimbabwe
];
export const DeletedPostId = '404';
export const BROADCAST_CHANNEL_NAME = 'dailydev_broadcast';
export const broadcastChannel = new BroadcastChannel(BROADCAST_CHANNEL_NAME);
export const coresDocsLink = 'https://r.daily.dev/cores';
export const webFunnelPrefix = '/helloworld';
export const creatorsTermsOfService = 'https://r.daily.dev/creators-terms';
export const boostDocsLink = 'https://r.daily.dev/boost';
export const recruiterBookLink = 'https://r.daily.dev/recruiter-book';