feat: add core curriculum chips to injected popup (#372)
* feat: add core curriculum chips to injected popup * fix: add VP and MAcore indicators * feat: core now defined in constructor * fix: make core and flags closer together * fix: stop empty core chip from showing when no core requirements * fix: remove optional chaining for core chips * feat: generalize Chip for both flags and core classes * fix: change types for storybook and add new story for CoreChip * fix: remove labelMap prop from Chip, chore: clean up imports * feat: change tooltip for core curriculum requirement --------- Co-authored-by: Derek Chen <derex1987@gmail.com>
This commit is contained in:
@@ -79,6 +79,8 @@ export class Course {
|
||||
scrapedAt!: number;
|
||||
/** The colors of the course when displayed */
|
||||
colors: CourseColors;
|
||||
/** The core curriculum requirements the course satisfies */
|
||||
core: string[];
|
||||
|
||||
constructor(course: Serialized<Course>) {
|
||||
Object.assign(this, course);
|
||||
@@ -88,6 +90,7 @@ export class Course {
|
||||
this.scrapedAt = Date.now();
|
||||
}
|
||||
this.colors = course.colors ? structuredClone(course.colors) : getCourseColors('emerald', 500);
|
||||
this.core = course.core ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user