refactor: vervang sprint-status badge door subtle tekst
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
81b3efc400
commit
9335ad0e0d
1 changed files with 4 additions and 14 deletions
|
|
@ -4,7 +4,6 @@ import { usePathname, useRouter } from 'next/navigation'
|
|||
import { useTransition } from 'react'
|
||||
import { ChevronDown } from 'lucide-react'
|
||||
import { toast } from 'sonner'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import {
|
||||
DropdownMenu,
|
||||
|
|
@ -32,13 +31,6 @@ const SPRINT_STATUS_LABEL: Record<SprintStatusApi, string> = {
|
|||
failed: 'Mislukt',
|
||||
}
|
||||
|
||||
const SPRINT_STATUS_BADGE: Record<SprintStatusApi, string> = {
|
||||
open: 'bg-status-in-progress text-foreground',
|
||||
closed: 'bg-status-done text-foreground',
|
||||
archived: 'bg-surface-container text-muted-foreground',
|
||||
failed: 'bg-status-failed text-foreground',
|
||||
}
|
||||
|
||||
export function SprintSwitcher({
|
||||
productId,
|
||||
sprints,
|
||||
|
|
@ -92,16 +84,14 @@ export function SprintSwitcher({
|
|||
{activeSprint ? activeSprint.code : 'Selecteer sprint'}
|
||||
</span>
|
||||
{activeSprint && (
|
||||
<Badge
|
||||
<span
|
||||
className={cn(
|
||||
'text-[10px] px-1.5 py-0',
|
||||
buildingSet.has(activeSprint.id)
|
||||
? 'bg-warning text-warning-foreground'
|
||||
: SPRINT_STATUS_BADGE[activeSprint.status],
|
||||
'text-[10px]',
|
||||
buildingSet.has(activeSprint.id) ? 'text-warning' : 'text-muted-foreground',
|
||||
)}
|
||||
>
|
||||
{buildingSet.has(activeSprint.id) ? 'BUILDING' : SPRINT_STATUS_LABEL[activeSprint.status]}
|
||||
</Badge>
|
||||
</span>
|
||||
)}
|
||||
<ChevronDown className="w-3 h-3 shrink-0 text-muted-foreground" />
|
||||
</DropdownMenuTrigger>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue