File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ import { isV2Only } from "../common/model";
2222import IdeaCard from "./IdeaCard" ;
2323import { Idea } from "./model" ;
2424import OfflineImageFallback from "../OfflineImageFallback" ;
25+ import { microbitOrgMiciProjectsUrl } from "../../external-links" ;
26+ import { useSettings } from "../../settings/settings" ;
2527
2628interface IdeasDocumentationProps {
2729 ideas : Idea [ ] ;
@@ -64,6 +66,7 @@ const ActiveLevel = ({
6466} : ActiveLevelProps ) => {
6567 const activeIdea = ideas . find ( ( idea ) => idea . slug . current === ideaId ) ;
6668 const intl = useIntl ( ) ;
69+ const [ { languageId } ] = useSettings ( ) ;
6770 const headingString = intl . formatMessage ( { id : "ideas-tab" } ) ;
6871 const ref = useRef < HTMLDivElement > ( null ) ;
6972 const contentRect = useResizeObserverContentRect ( ref ) ;
@@ -156,7 +159,7 @@ const ActiveLevel = ({
156159 link : ( chunks : ReactNode ) => (
157160 < Link
158161 color = "brand.500"
159- href = "https://microbit.org/projects/make-it-code-it/?filters=python"
162+ href = { microbitOrgMiciProjectsUrl ( languageId ) }
160163 target = "_blank"
161164 rel = "noopener"
162165 >
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const microbitOrgSupportedLangs = [
1313 "pt-pt" ,
1414 "sr" ,
1515 "zh-cn" ,
16- "zh-tw"
16+ "zh-tw" ,
1717] ;
1818
1919const langPath = ( languageId : string ) => {
@@ -23,3 +23,6 @@ const langPath = (languageId: string) => {
2323
2424export const microbitOrgUrl = ( languageId : string ) =>
2525 `https://microbit.org/${ langPath ( languageId ) } ` ;
26+
27+ export const microbitOrgMiciProjectsUrl = ( languageId : string ) =>
28+ `https://microbit.org/${ languageId } projects/make-it-code-it/?filters=python` ;
You can’t perform that action at this time.
0 commit comments