Skip to content

Commit 6067843

Browse files
authored
Fixes and sorting (#118)
* fixed summation after long fight with git :! * sorting kinda works - some problems exist * fixed search + filter interaction * sorting is better now / Metallic Materials are the only issue * asc/desc have correct icon now * added favicon * fixed the website name in index.html * ArrowLeft closes the CoursePopup * popup variables moved to the model * popup variables moved to the model * bug fix --------- Co-authored-by: Kacper Lisik <lisik@kth.se>
1 parent 9da195a commit 6067843

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

my-app/src/model.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,14 @@ export const model = {
252252
},
253253

254254
setPopupOpen(isOpen) {
255-
if (isOpen && this.selectedCourse) {
256-
this.addHistoryItem(this.selectedCourse.code);
257-
}
255+
console.log("OPENING/CLOSING A POPUP");
256+
// if (isOpen && this.selectedCourse) {
257+
// // this.addHistoryItem(this.selectedCourse.code);
258+
// console.log("user path history:")
259+
// for (let index = 0; index < this.searchHistory.length; index++) {
260+
// console.log(this.searchHistory[index]);
261+
// }
262+
// }
258263
this.isPopupOpen = isOpen;
259264
},
260265

my-app/src/views/Components/CoursePagePopup.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function CoursePagePopup({
179179
<h3 className="text-2xl font-bold text-[#2e2e4f] mb-0.5">Learning Outcomes:</h3>
180180
<div className="mb-3 h-0.5 w-full bg-violet-500"></div>
181181
{course.learning_outcomes && course.learning_outcomes.trim() &&
182-
course.description.trim() !== "null" ? (
182+
course.learning_outcomes.trim() !== "null" ? (
183183
<div
184184
className="text-lg leading-8 text-[#2e2e4f] font-semibold tracking-wide prose prose-slate max-w-full"
185185
dangerouslySetInnerHTML={{ __html: course.learning_outcomes }}
@@ -219,8 +219,8 @@ function CoursePagePopup({
219219
<div>
220220
<h3 className="text-2xl font-bold text-[#2e2e4f] mb-0.5">Prerequisites:</h3>
221221
<div className="mb-3 h-0.5 w-full bg-violet-500"></div>
222-
{course.prerequisites_text && course.prerequisites_text.trim() &&
223-
course.description.trim() !== "null" ? (
222+
{(course.prerequisites_text && course.prerequisites_text.trim() &&
223+
course.prerequisites_text.trim() !== "null" )? (
224224
<div
225225
className="text-lg leading-8 text-[#2e2e4f] font-semibold tracking-wide prose prose-slate max-w-full"
226226
dangerouslySetInnerHTML={{ __html: course.prerequisites_text }}

0 commit comments

Comments
 (0)