Skip to content

Commit

Permalink
[chore] fixed type error
Browse files Browse the repository at this point in the history
  • Loading branch information
Neha committed Jan 13, 2025
1 parent f9f25a7 commit dfd4167
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/StatusTag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const statusDetails = {
},
};

type ProjectStatus = keyof typeof statusDetails;
type ProjectStatus = keyof typeof statusDetails | string;

export default function StatusTag({
projectStatus,
Expand All @@ -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.',
Expand Down

0 comments on commit dfd4167

Please sign in to comment.