Skip to content

Commit

Permalink
fix sidebar urls
Browse files Browse the repository at this point in the history
  • Loading branch information
alasdairwilson committed Jan 26, 2024
1 parent bd068b2 commit ad75ac3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions components/EventItemView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const EventItemView: React.FC<EventItemProps> = ({ material, item, problems }) =
let name = `Error: ${item.section}`
let key = item.id
let indent = 0

let itemProblems: string[] = []
if (split.length === 4) {
const [repo, theme, course, section] = split
Expand All @@ -44,7 +43,6 @@ const EventItemView: React.FC<EventItemProps> = ({ material, item, problems }) =
}
let isCompleted = false
let completedLabel = ""

const uniqueUsers = new Set()
let uniqueUsersCount = 0
if (problems !== undefined && itemProblems.length > 0) {
Expand Down
12 changes: 6 additions & 6 deletions pages/event/[eventId]/[eventGroupId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,25 +92,25 @@ const EventGroupPage: NextPage<EventGroupProps> = ({ material, event, eventGroup
const sectionsOptions = material.themes.flatMap((theme) => {
return [
{
value: `${theme.id}`,
label: `${theme.name}`,
value: `${theme.repo}.${theme.id}`,
label: `${theme.repo} - ${theme.name}`,
},
].concat(
theme.courses.flatMap((course) => {
return [
{
value: `${theme.id}.${course.id}`,
label: `${theme.name} - ${course.name}`,
value: `${theme.repo}.${theme.id}.${course.id}`,
label: `${theme.repo} - ${theme.name} - ${course.name}`,
},
].concat(
course.sections.map((section) => {
const tags = section.tags.join(", ")
let label = `${theme.name} - ${course.name} - ${section.name}`
let label = `${theme.repo} - ${theme.name} - ${course.name} - ${section.name}`
if (tags.length > 0) {
label = `${label} [${tags}]`
}
return {
value: `${theme.id}.${course.id}.${section.id}`,
value: `${theme.repo}.${theme.id}.${course.id}.${section.id}`,
label,
}
})
Expand Down

0 comments on commit ad75ac3

Please sign in to comment.