lot of refactoring, reorganized course buttons. Now linking to professors directory page
This commit is contained in:
24
src/views/components/injected/CoursePopup/CoursePopup.tsx
Normal file
24
src/views/components/injected/CoursePopup/CoursePopup.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user