Fix: change the colour of the 'failed' badge for the cron UI (#32533)

* Fix: change the colour of the 'failed' badge for the cron UI

* simplify implementation

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
This commit is contained in:
Monica KhouryandAlaister Young authored and GitHub committed 2025-01-03 06:34:47 +08:00
1 parent 4f6b2be178
commit 91371a3d8f
1 file changed
+4 -1
@@ -146,7 +146,10 @@ export const CronJobCard = ({ job, onEditCronJob, onDeleteCronJob }: CronJobCard
className="font-sans text-sm"
/>
{data?.status && (
<Badge variant="success" className="capitalize ml-2">
<Badge
variant={data.status === 'failed' ? 'destructive' : 'success'}
className="capitalize ml-2"
>
{data.status}
</Badge>
)}