|
1 | | -import React from 'react'; |
2 | | -import PrerequisiteTree from "./PrerequisiteTree.jsx"; |
| 1 | +// import React from 'react'; |
| 2 | +// import PrerequisiteTree from "./PrerequisiteTree.jsx"; |
| 3 | +// // import {model} from '/src/model.js'; |
3 | 4 |
|
4 | | -// import {model} from '/src/model.js'; |
5 | | - |
6 | | -export default function CourseView({ course }) { |
7 | | - if (!course) return null; |
| 5 | +// export default function CourseView({ course }) { |
| 6 | +// if (!course) return null; |
8 | 7 |
|
9 | 8 |
|
10 | | - return ( |
11 | | - <div className="px-10 py-10 md:px-20 md:py-16 text-slate-900 space-y-12 font-sans"> |
12 | | - {/* Course Title Section */} |
13 | | - <div> |
14 | | - <h2 className="text-5xl font-extrabold text-[#2e2e4f]"> |
15 | | - {course.code} - {course.name} |
16 | | - <span className="ml-4 text-lg text-violet-900">({course.credits} Credits)</span> {/* Display Credits */} |
17 | | - </h2> |
18 | | - </div> |
19 | | - <div> |
20 | | - <button |
21 | | - className="text-yellow-500 cursor-pointer" |
22 | | - onClick={(e) => { |
23 | | - e.stopPropagation(); // prevent popup from opening |
24 | | - handleFavouriteClick(course.code); |
25 | | - }} |
26 | | - > |
27 | | - {/* {model.favouriteCourses.includes(course.code) |
28 | | - ? 'Remove from Favourites' |
29 | | - : 'Add to Favourites'} */} |
30 | | - </button> |
31 | | - </div> |
32 | | - |
33 | | - {/* Description Section */} |
34 | | - <div> |
35 | | - <h3 className="text-2xl font-bold text-[#3d3d68] mb-4">Course Description</h3> |
36 | | - <div |
37 | | - className="text-lg leading-8 text-[#2c2c2c] tracking-wide prose prose-slate max-w-full" |
38 | | - dangerouslySetInnerHTML={{ __html: course.description }} |
39 | | - /> |
40 | | - </div> |
41 | | - |
42 | | - {/* Prerequisite Graph Tree Section */} |
43 | | - <div> |
44 | | - <h3 className="text-2xl font-semibold text-[#2e2e4f]">Prerequisite Graph Tree</h3> |
45 | | - <p className="text-lg text-slate-700 leading-7">Graph tree or prerequisite info will go here...</p> |
46 | | - </div> |
47 | | - {/* Reviews Section */} |
48 | | - <div> |
49 | | - <h3 className="text-2xl font-semibold text-[#2e2e4f]">Reviews</h3> |
50 | | - <p className="text-lg text-slate-700 leading-7">Here would be some reviews of the course...</p> |
51 | | - </div> |
| 9 | +// return ( |
| 10 | +// <div className="px-10 py-10 md:px-20 md:py-16 text-slate-900 space-y-12 font-sans"> |
| 11 | +// {/* Course Title Section */} |
| 12 | +// <div> |
| 13 | +// <h2 className="text-5xl font-extrabold text-[#2e2e4f]"> |
| 14 | +// {course.code} - {course.name} |
| 15 | +// <span className="ml-4 text-lg text-violet-900">({course.credits} Credits)</span> {/* Display Credits */} |
| 16 | +// </h2> |
| 17 | +// </div> |
| 18 | +// <div> |
| 19 | +// <button |
| 20 | +// className="text-yellow-500 cursor-pointer" |
| 21 | +// onClick={(e) => { |
| 22 | +// e.stopPropagation(); // prevent popup from opening |
| 23 | +// handleFavouriteClick(course.code); |
| 24 | +// }} |
| 25 | +// > |
| 26 | +// {/* {model.favouriteCourses.includes(course.code) |
| 27 | +// ? 'Remove from Favourites' |
| 28 | +// : 'Add to Favourites'} */} |
| 29 | +// </button> |
| 30 | +// </div> |
52 | 31 |
|
| 32 | +// {/* Description Section */} |
| 33 | +// <div> |
| 34 | +// <h3 className="text-2xl font-bold text-[#3d3d68] mb-4">Course Description</h3> |
| 35 | +// <div |
| 36 | +// className="text-lg leading-8 text-[#2c2c2c] tracking-wide prose prose-slate max-w-full" |
| 37 | +// dangerouslySetInnerHTML={{ __html: course.description }} |
| 38 | +// /> |
| 39 | +// </div> |
53 | 40 |
|
54 | | - {/* Prerequisite Graph Tree Section */} |
55 | | - <div style={{ display: 'flex', flexDirection: 'column', marginBottom: '20px' }}> |
56 | | - <h3 style={{ fontFamily: 'Courier New, monospace', fontSize: '24px' }}>Prerequisite Graph Tree</h3> |
57 | | - {/* Placeholder for graph tree */} |
58 | | - <PrerequisiteTree /> |
59 | | - </div> |
| 41 | +// {/* Prerequisite Graph Tree Section */} |
| 42 | +// <div> |
| 43 | +// <h3 className="text-2xl font-semibold text-[#2e2e4f]">Prerequisite Graph Tree</h3> |
| 44 | +// <p className="text-lg text-slate-700 leading-7">Graph tree or prerequisite info will go here...</p> |
| 45 | +// </div> |
| 46 | +// {/* Reviews Section */} |
| 47 | +// <div> |
| 48 | +// <h3 className="text-2xl font-semibold text-[#2e2e4f]">Reviews</h3> |
| 49 | +// <p className="text-lg text-slate-700 leading-7">Here would be some reviews of the course...</p> |
| 50 | +// </div> |
60 | 51 |
|
61 | | - </div> |
62 | | - ); |
63 | | -} |
| 52 | +// {/* Prerequisite Graph Tree Section */} |
| 53 | +// <div style={{ display: 'flex', flexDirection: 'column', marginBottom: '20px' }}> |
| 54 | +// <h3 style={{ fontFamily: 'Courier New, monospace', fontSize: '24px' }}>Prerequisite Graph Tree</h3> |
| 55 | +// {/* Placeholder for graph tree */} |
| 56 | +// </div> |
| 57 | +// </div> |
| 58 | +// ); |
| 59 | +// } |
0 commit comments