From dfd4167c505661d85a9025a7455faffa8ce1032e Mon Sep 17 00:00:00 2001 From: Neha Date: Wed, 8 Jan 2025 18:04:26 -0600 Subject: [PATCH] [chore] fixed type error --- components/StatusTag/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/StatusTag/index.tsx b/components/StatusTag/index.tsx index e820283..62d7502 100644 --- a/components/StatusTag/index.tsx +++ b/components/StatusTag/index.tsx @@ -29,7 +29,7 @@ const statusDetails = { }, }; -type ProjectStatus = keyof typeof statusDetails; +type ProjectStatus = keyof typeof statusDetails | string; export default function StatusTag({ projectStatus, @@ -47,8 +47,8 @@ export default function StatusTag({ return `${month}.${day}.${year}`; } - // Use a default status if projectStatus is invalid - const status = statusDetails[projectStatus] || { + // Use a default fallback status for unknown statuses + const status = statusDetails[projectStatus as keyof typeof statusDetails] || { icon: null, color: COLORS.grey, // Fallback color info: 'Status information unavailable.',