From 815586dec838a2ea2e1ee33056c74a90db702be7 Mon Sep 17 00:00:00 2001 From: Shyam Guthikonda Date: Tue, 5 Sep 2023 15:43:39 -0700 Subject: [PATCH] To type --- .../src/components/schedules/StatusBadge.tsx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/desktop-client/src/components/schedules/StatusBadge.tsx b/packages/desktop-client/src/components/schedules/StatusBadge.tsx index a1840ab3c3d..3e1c395f2b1 100644 --- a/packages/desktop-client/src/components/schedules/StatusBadge.tsx +++ b/packages/desktop-client/src/components/schedules/StatusBadge.tsx @@ -67,16 +67,15 @@ export function getStatusProps(status: Status) { return { color, backgroundColor, Icon }; } -enum Status { - Missed = 'missed', - Due = 'due', - Upcoming = 'upcoming', - Paid = 'paid', - Completed = 'completed', - Pending = 'pending', - Scheduled = 'scheduled', - Cleared = 'cleared', -} +type Status = + | 'missed' + | 'due' + | 'upcoming' + | 'paid' + | 'completed' + | 'pending' + | 'scheduled' + | 'cleared'; type StatusBadgeProps = { status: Status;