fix(dashboard): center empty mission text and neutralize heading when none exist
The mission briefing widget now centers its 'No missions currently scheduled.' empty state, and its heading falls back to a neutral 'Missions' label when there is neither an upcoming nor a completed mission (previously it still said 'Last Mission').
This commit is contained in:
parent
51a6deb2b5
commit
29bc2d40d7
2 changed files with 13 additions and 3 deletions
|
|
@ -333,7 +333,13 @@ export default async function HomePage() {
|
|||
"mission-briefing",
|
||||
<MissionBriefing
|
||||
mission={mission}
|
||||
heading={upcomingRes.docs[0] ? "Next Mission" : "Last Mission"}
|
||||
heading={
|
||||
upcomingRes.docs[0]
|
||||
? "Next Mission"
|
||||
: briefingMission
|
||||
? "Last Mission"
|
||||
: "Missions"
|
||||
}
|
||||
/>,
|
||||
);
|
||||
widgetNodes.set("recent-events", <RecentEvents events={events} currentUserId={userId} />);
|
||||
|
|
|
|||
|
|
@ -17,11 +17,15 @@ export function MissionBriefing({ mission, heading = "Next Mission" }: MissionBr
|
|||
>
|
||||
{/* No separate header row: the frame strip names the section and the
|
||||
mission card carries its own "View details" affordance. */}
|
||||
<div className="p-4">
|
||||
<div className="flex min-h-0 flex-1 flex-col p-4">
|
||||
{mission ? (
|
||||
<MissionCard mission={mission} showFullDetails />
|
||||
) : (
|
||||
<p className="text-sm text-muted-foreground italic">No missions currently scheduled.</p>
|
||||
<div className="flex min-w-0 flex-1 items-center justify-center">
|
||||
<p className="text-center text-sm text-muted-foreground italic">
|
||||
No missions currently scheduled.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</TacticalFrame>
|
||||
|
|
|
|||
Loading…
Reference in a new issue