Skip to content

Commit

Permalink
fix modules-list
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo committed Jan 31, 2024
1 parent ade8300 commit 389caed
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
File renamed without changes.
2 changes: 2 additions & 0 deletions client/src/curriculum/modules-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { ModuleIndexEntry } from "../../../libs/types/curriculum";
import { TopicIcon } from "./topic-icon";
import { topic2css } from "./utils";

import "./modules-list.scss";

export function ModulesListList({ modules }: { modules: ModuleIndexEntry[] }) {
return (
<ol>
Expand Down
26 changes: 26 additions & 0 deletions client/src/curriculum/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Using this import fails the build...
//import { Topic } from "../../../libs/types/curriculum";
export enum Topic {
WebStandards = "Web Standards & Semantics",
Styling = "Styling",
Scripting = "Scripting",
BestPractices = "Best Practices",
Tooling = "Tooling",
None = "",
}
export function topic2css(topic?: Topic) {
switch (topic) {
case Topic.WebStandards:
return "standards";
case Topic.Styling:
return "styling";
case Topic.Scripting:
return "scripting";
case Topic.Tooling:
return "tooling";
case Topic.BestPractices:
return "practices";
default:
return "none";
}
}

0 comments on commit 389caed

Please sign in to comment.