-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathurls.js
67 lines (62 loc) · 1.82 KB
/
urls.js
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
const baseUrl = 'http://localhost:6012';
// List of routes with paths and labels
const sublinks = [
{ label: 'Homepage', path: '/' },
{ label: 'Add Service', path: '/add-service' },
{ label: 'Get Started', path: '/using-notify/get-started' },
{ label: 'Trial Mode', path: '/using-notify/trial-mode' },
{ label: 'Pricing', path: '/using-notify/pricing' },
{ label: 'Delivery Status', path: '/using-notify/delivery-status' },
{ label: 'Guidance', path: '/using-notify/guidance' },
{ label: 'Support', path: '/support' },
{ label: 'Best Practices', path: '/using-notify/best-practices' },
{ label: 'Clear Goals', path: '/using-notify/best-practices/clear-goals' },
{
label: 'Rules And Regulations',
path: '/using-notify/best-practices//rules-and-regulations',
},
{ label: 'Establish Trust', path: '/using-notify/best-practices//establish-trust' },
{
label: 'Write For Action',
path: '/using-notify/best-practices//write-for-action',
},
{
label: 'Multiple Languages',
path: '/using-notify/best-practices//multiple-languages',
},
{
label: 'Benchmark Performance',
path: '/using-notify/best-practices//benchmark-performance',
},
{
label: 'About',
path: '/about',
},
{
label: 'Why Text Messaging',
path: '/about/why-text-messaging',
},
{
label: 'Security',
path: '/about/security',
},
{
label: 'Join Notify',
path: '/join-notify',
},
{
label: 'Contact',
path: '/contact',
},
// Add more links here as needed
];
const createFullUrl = (base, path) => `${base}${path}`;
// Build url using base and path
const constructUrls = (base, sublinks) =>
sublinks.reduce((acc, { label, path }) => {
return { ...acc, [label]: createFullUrl(base, path) };
}, {});
module.exports = {
baseUrl,
urls: constructUrls(baseUrl, sublinks),
};