Skip to content
Snippets Groups Projects
Commit c22ee0db authored by danieldeng2's avatar danieldeng2
Browse files

Links module heading to module page

parent ef29f035
No related branches found
No related tags found
No related merge requests found
import React, { CSSProperties } from "react"; import React, { CSSProperties } from "react";
import Card from "react-bootstrap/Card"; import Card from "react-bootstrap/Card";
import styles from "./style.module.scss"; import styles from "./style.module.scss";
import { Link } from "react-router-dom";
export interface ModuleHeadingprops { export interface ModuleHeadingprops {
moduleCode: string; moduleCode: string;
title: string; title: string;
...@@ -14,7 +14,12 @@ const ModuleHeading: React.FC<ModuleHeadingprops> = ({ ...@@ -14,7 +14,12 @@ const ModuleHeading: React.FC<ModuleHeadingprops> = ({
style, style,
}) => { }) => {
return ( return (
<Card style={style} className={styles.moduleCard}> <Card
style={style}
className={styles.moduleCard}
as={Link}
to={`modules/${moduleCode}`}
>
<Card.Header> <Card.Header>
<span>{moduleCode}</span> <span>{moduleCode}</span>
</Card.Header> </Card.Header>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment