@@ -14,14 +14,19 @@ const Footer = () => {
14
14
i18n : { currentLocale } ,
15
15
} = useDocusaurusContext ( ) ;
16
16
17
- const external_links = React . useMemo ( ( ) => {
17
+ const footer_links = React . useMemo ( ( ) => {
18
18
const is_en = currentLocale === 'en' ;
19
- const get_url = ( path : string ) =>
20
- `https://deriv.com${ ! is_en ? `/${ currentLocale } ` : '' } /${ path } ` ;
19
+ const get_url = ( path : string , isExternal = true ) => {
20
+ const pathInfo = `${ ! is_en ? `/${ currentLocale } ` : '' } /${ path } ` ;
21
+ return isExternal ? `https://deriv.com${ pathInfo } ` : pathInfo ;
22
+ } ;
21
23
return {
22
24
root : get_url ( '' ) ,
23
25
who_we_are : get_url ( 'who-we-are' ) ,
24
26
contact_us : get_url ( 'contact-us' ) ,
27
+ documentation : get_url ( 'docs/intro' , false ) ,
28
+ dashboard : get_url ( 'dashboard' , false ) ,
29
+ api_explorer : get_url ( 'api-explorer' , false ) ,
25
30
} ;
26
31
} , [ currentLocale ] ) ;
27
32
@@ -31,17 +36,17 @@ const Footer = () => {
31
36
content : (
32
37
< ul className = { styles . List } >
33
38
< li >
34
- < a href = '/docs/intro' className = { styles . Link } >
39
+ < a href = { footer_links . documentation } className = { styles . Link } >
35
40
< Translate > Documentation</ Translate >
36
41
</ a >
37
42
</ li >
38
43
< li >
39
- < a href = '/ dashboard' className = { styles . Link } >
44
+ < a href = { footer_links . dashboard } className = { styles . Link } >
40
45
< Translate > Dashboard</ Translate >
41
46
</ a >
42
47
</ li >
43
48
< li >
44
- < a href = '/api-explorer' className = { styles . Link } >
49
+ < a href = { footer_links . api_explorer } className = { styles . Link } >
45
50
< Translate > API explorer</ Translate >
46
51
</ a >
47
52
</ li >
@@ -63,17 +68,17 @@ const Footer = () => {
63
68
content : (
64
69
< ul className = { styles . List } >
65
70
< li >
66
- < a href = { external_links . root } target = 'blank' className = { styles . Link } >
71
+ < a href = { footer_links . root } target = 'blank' className = { styles . Link } >
67
72
< LabelPairedArrowUpRightSmRegularIcon /> < Translate > Homepage</ Translate >
68
73
</ a >
69
74
</ li >
70
75
< li >
71
- < a href = { external_links . who_we_are } target = 'blank' className = { styles . Link } >
76
+ < a href = { footer_links . who_we_are } target = 'blank' className = { styles . Link } >
72
77
< LabelPairedArrowUpRightSmRegularIcon /> < Translate > Who we are</ Translate >
73
78
</ a >
74
79
</ li >
75
80
< li >
76
- < a href = { external_links . contact_us } target = 'blank' className = { styles . Link } >
81
+ < a href = { footer_links . contact_us } target = 'blank' className = { styles . Link } >
77
82
< LabelPairedArrowUpRightSmRegularIcon /> < Translate > Contact us</ Translate >
78
83
</ a >
79
84
</ li >
@@ -100,17 +105,17 @@ const Footer = () => {
100
105
</ Text >
101
106
< ul className = { styles . List } >
102
107
< li >
103
- < a href = '/docs/intro' className = { styles . Link } >
108
+ < a href = { footer_links . documentation } className = { styles . Link } >
104
109
< Translate > Documentation</ Translate >
105
110
</ a >
106
111
</ li >
107
112
< li >
108
- < a href = '/ dashboard' className = { styles . Link } >
113
+ < a href = { footer_links . dashboard } className = { styles . Link } >
109
114
< Translate > Dashboard</ Translate >
110
115
</ a >
111
116
</ li >
112
117
< li >
113
- < a href = '/api-explorer' className = { styles . Link } >
118
+ < a href = { footer_links . api_explorer } className = { styles . Link } >
114
119
< Translate > API explorer</ Translate >
115
120
</ a >
116
121
</ li >
@@ -136,17 +141,17 @@ const Footer = () => {
136
141
</ Text >
137
142
< ul className = { styles . List } >
138
143
< li >
139
- < a href = { external_links . root } target = 'blank' className = { styles . Link } >
144
+ < a href = { footer_links . root } target = 'blank' className = { styles . Link } >
140
145
< LabelPairedArrowUpRightSmRegularIcon /> < Translate > Homepage</ Translate >
141
146
</ a >
142
147
</ li >
143
148
< li >
144
- < a href = { external_links . who_we_are } target = 'blank' className = { styles . Link } >
149
+ < a href = { footer_links . who_we_are } target = 'blank' className = { styles . Link } >
145
150
< LabelPairedArrowUpRightSmRegularIcon /> < Translate > Who we are</ Translate >
146
151
</ a >
147
152
</ li >
148
153
< li >
149
- < a href = { external_links . contact_us } target = 'blank' className = { styles . Link } >
154
+ < a href = { footer_links . contact_us } target = 'blank' className = { styles . Link } >
150
155
< LabelPairedArrowUpRightSmRegularIcon /> < Translate > Contact us</ Translate >
151
156
</ a >
152
157
</ li >
0 commit comments