sidebar options fix
This commit is contained in:
parent
5e7765d6e3
commit
15ec068f2f
|
|
@ -75,12 +75,11 @@ const navEntries: NavEntry[] = [
|
||||||
{
|
{
|
||||||
kind: "group",
|
kind: "group",
|
||||||
label: "Content",
|
label: "Content",
|
||||||
basePath: "/content",
|
basePath: "/new-content",
|
||||||
activePaths: ["/content", "/new-content"],
|
activePaths: ["/new-content"],
|
||||||
icon: BookOpen,
|
icon: BookOpen,
|
||||||
children: [
|
children: [
|
||||||
{ label: "Manage practices", to: "/content", end: true },
|
{ label: "Learning content", to: "/new-content", end: true },
|
||||||
{ label: "New content", to: "/new-content", end: true },
|
|
||||||
{ label: "Reorder structure", to: "/new-content/reorder" },
|
{ label: "Reorder structure", to: "/new-content/reorder" },
|
||||||
{ label: "Question types", to: "/new-content/question-types" },
|
{ label: "Question types", to: "/new-content/question-types" },
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ function LessonRow({ lesson }: { lesson: LearningActivityLesson }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function ModuleBlock({ module }: { module: LearningActivityModule }) {
|
function ModuleBlock({ module }: { module: LearningActivityModule }) {
|
||||||
const [open, setOpen] = useState(module.access.is_accessible || module.access.is_completed);
|
const [open, setOpen] = useState(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="rounded-xl border border-grayScale-100 bg-grayScale-50/60">
|
<div className="rounded-xl border border-grayScale-100 bg-grayScale-50/60">
|
||||||
|
|
@ -120,7 +120,7 @@ function ModuleBlock({ module }: { module: LearningActivityModule }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function UnitBlock({ unit }: { unit: LearningActivityUnit }) {
|
function UnitBlock({ unit }: { unit: LearningActivityUnit }) {
|
||||||
const [open, setOpen] = useState(unit.access.is_accessible || unit.access.is_completed);
|
const [open, setOpen] = useState(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="rounded-xl border border-grayScale-100">
|
<div className="rounded-xl border border-grayScale-100">
|
||||||
|
|
@ -155,7 +155,7 @@ function UnitBlock({ unit }: { unit: LearningActivityUnit }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function CourseBlock({ course, examPrep }: { course: LearningActivityCourse; examPrep?: boolean }) {
|
function CourseBlock({ course, examPrep }: { course: LearningActivityCourse; examPrep?: boolean }) {
|
||||||
const [open, setOpen] = useState(course.access.is_accessible || course.access.is_completed);
|
const [open, setOpen] = useState(false);
|
||||||
const children = examPrep ? (course.units ?? []) : (course.modules ?? []);
|
const children = examPrep ? (course.units ?? []) : (course.modules ?? []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user