From 9b4d61c2b0d8806b5d4a10296c1cc1266ac4229f Mon Sep 17 00:00:00 2001 From: Derek Chen Date: Fri, 22 Mar 2024 19:12:06 -0500 Subject: [PATCH] feat: added flag ;-; (#195) Co-authored-by: Samuel Gunter --- src/views/components/common/Chip.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/components/common/Chip.tsx b/src/views/components/common/Chip.tsx index c8ff05af..10d27e7a 100644 --- a/src/views/components/common/Chip.tsx +++ b/src/views/components/common/Chip.tsx @@ -23,6 +23,8 @@ interface Props { * @returns */ export function Chip({ label }: React.PropsWithChildren): JSX.Element { + const longFlagName = Object.entries(flagMap).find(([full, short]) => short === label)?.[0] ?? label; + return ( ): JSX.Element { style={{ backgroundColor: '#FFD600', }} - title={Object.entries(flagMap).find(([full, short]) => short === label)?.[0] ?? label} + title={`${longFlagName} flag`} > {label}