forked from microsoft/Solution-Accelerators
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsectionMapping.ts
More file actions
23 lines (20 loc) · 720 Bytes
/
Copy pathsectionMapping.ts
File metadata and controls
23 lines (20 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export const SECTION_MAPPING: Record<string, string> = {
'featured': 'featured',
'accelerators': 'accelerators',
'differentiators': 'differentiators',
'how-it-works': 'how-it-works',
'success-stories': 'customer-trust'
};
export const REVERSE_SECTION_MAPPING: Record<string, string> = {
'featured': 'featured',
'accelerators': 'accelerators',
'differentiators': 'differentiators',
'how-it-works': 'how-it-works',
'customer-trust': 'success-stories'
};
export const getSectionFromId = (sectionId: string): string => {
return REVERSE_SECTION_MAPPING[sectionId] || sectionId;
};
export const getSectionIdFromSection = (section: string): string => {
return SECTION_MAPPING[section] || section;
};