1
0
Fork 0
polaris-task-force/src/components/frontend/dashboard/MissionBriefing.tsx
Z8MB1E 09ed08caf3 fix(dashboard): make stretched cards fill cells and truncate instead of overflowing
- Widget wrappers use flex-1 with a min-w-0 chain so cards stay at their
  grid-cell width instead of shrinking to content or overflowing it
- ItemContent gains min-w-0 so nowrap text ellipsizes inside the card
  (notifications, campaigns, tickets) rather than clipping at the viewport
- Stretched Service Summary and Mission Briefing top-pack their content;
  Mission Briefing header flips between Next Mission and Last Mission
2026-09-10 20:03:39 -04:00

38 lines
1.2 KiB
TypeScript

import Link from "next/link";
import { Item, ItemContent, ItemHeader, ItemTitle } from "@/components/ui/item";
import {
MissionCard,
type MissionCardProps,
} from "@/components/frontend/intelligence/MissionCard";
import { CrosshairIcon } from "lucide-react";
interface MissionBriefingProps {
readonly mission: MissionCardProps["mission"] | null;
readonly heading?: string;
}
export function MissionBriefing({ mission, heading = "Next Mission" }: MissionBriefingProps) {
return (
<Item variant="outline" className="items-start content-start">
<ItemHeader>
<div className="flex items-center gap-2">
<CrosshairIcon className="size-4 text-muted-foreground" />
<ItemTitle>{heading}</ItemTitle>
</div>
<Link
href="/intelligence/missions"
className="text-xs text-muted-foreground transition-colors hover:text-primary"
>
View all
</Link>
</ItemHeader>
<ItemContent>
{mission ? (
<MissionCard mission={mission} showFullDetails />
) : (
<p className="text-sm text-muted-foreground italic">No missions currently scheduled.</p>
)}
</ItemContent>
</Item>
);
}