Skip to content

Commit 0faf6e1

Browse files
committed
feat(timetable): display asterisk on module list as well
1 parent 20164e9 commit 0faf6e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

website/src/views/timetable/TimetableModulesTable.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export type Props = {
4141
modules: ModuleWithColor[];
4242
tombstone: TombstoneModule | null; // Placeholder for a deleted module
4343
customiseModule: ModuleCode;
44+
customisedModules: ModuleCode[];
4445

4546
// Actions
4647
selectModuleColor: (semester: Semester, moduleCode: ModuleCode, colorIndex: ColorIndex) => void;
@@ -135,7 +136,7 @@ export const TimetableModulesTableComponent: React.FC<Props> = (props) => {
135136
};
136137

137138
const renderModule = (module: ModuleWithColor) => {
138-
const { semester, readOnly, tombstone, resetTombstone } = props;
139+
const { semester, readOnly, tombstone, resetTombstone, customisedModules } = props;
139140

140141
if (tombstone && tombstone.moduleCode === module.moduleCode) {
141142
return <ModuleTombstone module={module} resetTombstone={resetTombstone} />;
@@ -167,6 +168,7 @@ export const TimetableModulesTableComponent: React.FC<Props> = (props) => {
167168
{!readOnly && renderModuleActions(module)}
168169
<Link to={modulePage(module.moduleCode, module.title)}>
169170
{module.moduleCode} {module.title}
171+
{customisedModules.includes(module.moduleCode) && '*'}
170172
</Link>
171173
<div className={styles.moduleExam}>{intersperse(secondRowText, BULLET_NBSP)}</div>
172174
</div>

0 commit comments

Comments
 (0)