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 = () => {
198198 < Link
199199 color = "brand.600"
200200 textDecoration = "underline"
201- href = { landingPageUrl ( ) }
201+ href = { landingPageUrl ( languageId ) }
202202 >
203203 { children }
204204 </ Link >
Original file line number Diff line number Diff line change @@ -12,12 +12,16 @@ const microbitOrgBaseUrl =
1212 ? "https://microbit.org/"
1313 : "https://stage.microbit.org/" ;
1414
15+ const langPath = ( languageId : string ) =>
16+ languageId === "en" ? "" : `${ languageId . toLowerCase ( ) } /` ;
17+
1518export 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 ) } /`;
1922
2023export const userGuideUrl = ( ) =>
2124 `${ microbitOrgBaseUrl } get-started/user-guide/microbit-createai/` ;
2225
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