Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(curriculum): fix feedback changes #10610

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading