File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ const HomePage = () => {
198
198
< Link
199
199
color = "brand.600"
200
200
textDecoration = "underline"
201
- href = { landingPageUrl ( ) }
201
+ href = { landingPageUrl ( languageId ) }
202
202
>
203
203
{ children }
204
204
</ Link >
Original file line number Diff line number Diff line change @@ -12,12 +12,16 @@ const microbitOrgBaseUrl =
12
12
? "https://microbit.org/"
13
13
: "https://stage.microbit.org/" ;
14
14
15
+ const langPath = ( languageId : string ) =>
16
+ languageId === "en" ? "" : `${ languageId . toLowerCase ( ) } /` ;
17
+
15
18
export const projectUrl = ( slug : string , language : string ) =>
16
- `${ microbitOrgBaseUrl } ${
17
- language === "en" ? "" : ` ${ language . toLowerCase ( ) } /`
18
- } projects/make-it-code-it/${ encodeURIComponent ( slug ) } /`;
19
+ `${ microbitOrgBaseUrl } ${ langPath (
20
+ language
21
+ ) } projects/make-it-code-it/${ encodeURIComponent ( slug ) } /`;
19
22
20
23
export const userGuideUrl = ( ) =>
21
24
`${ microbitOrgBaseUrl } get-started/user-guide/microbit-createai/` ;
22
25
23
- export const landingPageUrl = ( ) => `${ microbitOrgBaseUrl } ai/` ;
26
+ export const landingPageUrl = ( language : string ) =>
27
+ `${ microbitOrgBaseUrl } ${ langPath ( language ) } ai/` ;
You can’t perform that action at this time.
0 commit comments