Skip to content

Commit

Permalink
fix(curriculum): fix feedback changes (#10610)
Browse files Browse the repository at this point in the history
Fix breadcrumb.
Fix about page.
  • Loading branch information
fiji-flo authored Feb 28, 2024
1 parent 02f2010 commit 5cd436c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion build/curriculum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,15 @@ async function buildParents(url: string): Promise<DocParent[]> {
return { url, title };
});
const parents = breadcrumbPath(url, index);
if (!parents) {
if (parents) {
const { url, title } = index[0];
if (parents[0]?.uri !== url) {
return [{ uri: url, title }, ...parents];
}
return parents;
}

return [];
}

async function readCurriculumPage(
Expand Down
6 changes: 5 additions & 1 deletion client/src/curriculum/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ export function CurriculumAbout(props: HydrationData<any, CurriculumDoc>) {
return (
<CurriculumLayout
doc={doc}
extraClasses={["curriculum-about", `topic-${topic2css(doc?.topic)}`]}
extraClasses={[
"curriculum-about",
"curriculum-module",
`topic-${topic2css(doc?.topic)}`,
]}
>
<header>
<h1>
Expand Down
5 changes: 4 additions & 1 deletion client/src/curriculum/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ export function Curriculum(appProps: HydrationData) {
return (
<Routes>
<Route path="/" element={<CurriculumLanding {...appProps} />} />
<Route path="/about/" element={<CurriculumAbout {...appProps} />} />
<Route
path="/about-curriculum/"
element={<CurriculumAbout {...appProps} />}
/>
<Route
path="/:module/"
element={<CurriculumModuleOverview {...appProps} />}
Expand Down

0 comments on commit 5cd436c

Please sign in to comment.