mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
links in module list
This commit is contained in:
@@ -25,6 +25,9 @@ import ClientOnly from "@/components/ClientOnly";
|
|||||||
import ExpandIcon from "../../../../components/icons/ExpandIcon";
|
import ExpandIcon from "../../../../components/icons/ExpandIcon";
|
||||||
import { useDraggingContext } from "../context/draggingContext";
|
import { useDraggingContext } from "../context/draggingContext";
|
||||||
import DropTargetStyling from "../calendar/DropTargetStyling";
|
import DropTargetStyling from "../calendar/DropTargetStyling";
|
||||||
|
import Link from "next/link";
|
||||||
|
import { getModuleItemUrl } from "@/services/urlUtils";
|
||||||
|
import { useCourseContext } from "../context/courseContext";
|
||||||
|
|
||||||
export default function ExpandableModule({
|
export default function ExpandableModule({
|
||||||
moduleName,
|
moduleName,
|
||||||
@@ -42,6 +45,7 @@ export default function ExpandableModule({
|
|||||||
);
|
);
|
||||||
const { data: quizzes } = useQuizzesQueries(moduleName, quizNames);
|
const { data: quizzes } = useQuizzesQueries(moduleName, quizNames);
|
||||||
const { data: pages } = usePagesQueries(moduleName, pageNames);
|
const { data: pages } = usePagesQueries(moduleName, pageNames);
|
||||||
|
const { courseName } = useCourseContext();
|
||||||
|
|
||||||
const [expanded, setExpanded] = useState(false);
|
const [expanded, setExpanded] = useState(false);
|
||||||
|
|
||||||
@@ -125,7 +129,17 @@ export default function ExpandableModule({
|
|||||||
<div className="text-end text-slate-500 me-2">
|
<div className="text-end text-slate-500 me-2">
|
||||||
{date && getDateOnlyMarkdownString(date)}
|
{date && getDateOnlyMarkdownString(date)}
|
||||||
</div>
|
</div>
|
||||||
<div className="">{item.name}</div>
|
<Link
|
||||||
|
href={getModuleItemUrl(
|
||||||
|
courseName,
|
||||||
|
moduleName,
|
||||||
|
type,
|
||||||
|
item.name
|
||||||
|
)}
|
||||||
|
className="transition-all hover:text-slate-50 hover:scale-105"
|
||||||
|
>
|
||||||
|
{item.name}
|
||||||
|
</Link>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
Reference in New Issue
Block a user