Skip to content

Commit

Permalink
fix: Add course_key in url
Browse files Browse the repository at this point in the history
  • Loading branch information
sergivalero20 committed Jun 18, 2024
1 parent 0dab324 commit 366c9d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/features/Courses/CoursesDetailPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const CoursesDetailPage = () => {
};

const courseInfo = useSelector((state) => state.courses.table.data)
.find((course) => course?.masterCourseName === courseId) || defaultCourseInfo;
.find((course) => course?.masterCourseId === courseId) || defaultCourseInfo;
const institution = useSelector((state) => state.main.selectedInstitution);
const classes = useSelector((state) => state.classes.table);
const totalStudents = courseInfo.numberOfStudents + courseInfo.numberOfPendingStudents;
Expand Down
2 changes: 1 addition & 1 deletion src/features/Courses/CoursesTable/columns.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const columns = [
{
Header: 'Courses',
accessor: 'masterCourseName',
Cell: ({ row }) => (<Link to={`/courses/${row.values.masterCourseName}`} className="link">{row.values.masterCourseName}</Link>),
Cell: ({ row }) => (<Link to={`/courses/${row.original.masterCourseId}`} className="link">{row.values.masterCourseName}</Link>),
},
{
Header: 'Classes',
Expand Down

0 comments on commit 366c9d7

Please sign in to comment.