lot of refactoring, reorganized course buttons. Now linking to professors directory page

This commit is contained in:
Sriram Hariharan
2023-03-07 21:49:41 -06:00
parent 04a82fb6a6
commit 353c43c987
26 changed files with 556 additions and 311 deletions

View File

@@ -0,0 +1,24 @@
import React from 'react';
import { Course } from 'src/shared/types/Course';
import Popup from '../../common/Popup/Popup';
import CourseDescription from './CourseDescription/CourseDescription';
import CourseHeader from './CourseHeader/CourseHeader';
import styles from './CoursePopup.module.scss';
interface Props {
course: Course;
onClose: () => void;
}
/**
* The popup that appears when the user clicks on a course for more details.
*/
export default function CoursePopup({ course, onClose }: Props) {
console.log(course);
return (
<Popup className={styles.popup} overlay onClose={onClose}>
<CourseHeader course={course} onClose={onClose} />
<CourseDescription course={course} />
</Popup>
);
}