show current subject inside assignment details page as a pill

This commit is contained in:
Fhj0607
2026-04-29 11:27:30 +02:00
parent c46508d233
commit 4205961542
2 changed files with 100 additions and 27 deletions

View File

@@ -50,4 +50,9 @@ export const SUBJECT_COLORS: Record<
export const SUBJECT_COLOR_KEYS = Object.keys(
SUBJECT_COLORS
) as SubjectColor[];
) as SubjectColor[];
export const getSubjectColorSet = (color?: SubjectColor) => {
const colorKey: SubjectColor = color ?? 'slate';
return SUBJECT_COLORS[colorKey];
};