Rename CoursePopup
Old one to "Old", remove "2" from new one
This commit is contained in:
@@ -1,27 +1,20 @@
|
||||
import { Course } from '@shared/types/Course';
|
||||
import { UserSchedule } from '@shared/types/UserSchedule';
|
||||
import Popup from '@views/components/common/Popup/Popup';
|
||||
import React from 'react';
|
||||
import Popup from '../../common/Popup/Popup';
|
||||
import CourseDescription from './CourseDescription/CourseDescription';
|
||||
import CourseHeader from './CourseHeader/CourseHeader';
|
||||
import styles from './CoursePopup.module.scss';
|
||||
import GradeDistribution from './GradeDistribution/GradeDistribution';
|
||||
import { Course } from 'src/shared/types/Course';
|
||||
import { UserSchedule } from 'src/shared/types/UserSchedule';
|
||||
import CourseHeadingAndActions from './CourseHeadingAndActions';
|
||||
|
||||
interface Props {
|
||||
interface CoursePopup2Props {
|
||||
course: Course;
|
||||
activeSchedule?: UserSchedule;
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* The popup that appears when the user clicks on a course for more details.
|
||||
*/
|
||||
export default function CoursePopup({ course, activeSchedule, onClose }: Props) {
|
||||
return (
|
||||
<Popup className={styles.popup} overlay onClose={onClose}>
|
||||
<CourseHeader course={course} activeSchedule={activeSchedule} onClose={onClose} />
|
||||
<CourseDescription course={course} />
|
||||
<GradeDistribution course={course} />
|
||||
</Popup>
|
||||
);
|
||||
}
|
||||
const CoursePopup = ({ course, activeSchedule, onClose }: CoursePopup2Props) => (
|
||||
<Popup overlay className='px-6' onClose={onClose}>
|
||||
<div className='flex flex-col'>
|
||||
<CourseHeadingAndActions course={course} onClose={onClose} activeSchedule={activeSchedule} />
|
||||
</div>
|
||||
</Popup>
|
||||
);
|
||||
export default CoursePopup;
|
||||
|
||||
Reference in New Issue
Block a user