fix: don't crash on cultural diversity flag (#196)
Co-authored-by: Som Gupta <78577376+knownotunknown@users.noreply.github.com>
This commit is contained in:
@@ -9,7 +9,7 @@ export const flagMap = {
|
|||||||
Writing: 'WR',
|
Writing: 'WR',
|
||||||
'Quantitative Reasoning': 'QR',
|
'Quantitative Reasoning': 'QR',
|
||||||
'Global Cultures': 'GC',
|
'Global Cultures': 'GC',
|
||||||
'Cultural Diversity in the United States': 'CD',
|
'Cultural Diversity': 'CD',
|
||||||
Ethics: 'E',
|
Ethics: 'E',
|
||||||
'Independent Inquiry': 'II',
|
'Independent Inquiry': 'II',
|
||||||
} as const satisfies Record<string, Flag>;
|
} as const satisfies Record<string, Flag>;
|
||||||
@@ -31,7 +31,7 @@ export function Chip({ label }: React.PropsWithChildren<Props>): JSX.Element {
|
|||||||
style={{
|
style={{
|
||||||
backgroundColor: '#FFD600',
|
backgroundColor: '#FFD600',
|
||||||
}}
|
}}
|
||||||
title={Object.entries(flagMap).find(([full, short]) => short === label)![0]}
|
title={Object.entries(flagMap).find(([full, short]) => short === label)?.[0] ?? label}
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
Reference in New Issue
Block a user