mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 14:32:03 +00:00
refactor(ui): move 62 hand-written empty states onto EmptyState
The admin sections, the cycle, illness, medication, mood, records and settings cards, the pickers and dialogs said nothing-here-yet in a hand-written muted paragraph in five sizes and three alignments. List and section states now render through EmptyState (plain, compact; the three with a next step carry it as the action), and the six chart bodies through ChartEmptyState at their former height. The thirteen that stay are a field without a value or a hint inside an editor, not a list state. The ratchet ceiling drops from 75 to 13.
This commit is contained in:
1 parent
fe021c0ffd
commit
e7ee416e19
56 files changed
+353
-224
No files matched your search
@@ -44,6 +44,7 @@ import { tileKeyOf } from "./day-values-model";
|
||||
import { shiftDateKey } from "./day-url";
|
||||
import { useDay, usePrefetchDay } from "./use-day";
|
||||
import { useDayValueFormat } from "./use-day-value-format";
|
||||
import { EmptyState } from "@/components/ui/empty-state";
|
||||
|
||||
/**
|
||||
* One day, as the layer shows it in every shell: a header with the date and
|
||||
@@ -282,9 +283,12 @@ export function DayView({
|
||||
) : data === undefined ? (
|
||||
<DaySkeleton />
|
||||
) : isEmpty ? (
|
||||
<p className="text-muted-foreground text-sm" data-slot="day-empty">
|
||||
{t("day.empty")}
|
||||
</p>
|
||||
<EmptyState
|
||||
variant="plain"
|
||||
size="compact"
|
||||
title={t("day.empty")}
|
||||
data-slot="day-empty"
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
<DayRunning items={data.running} date={date} />
|
||||
|
||||
Reference in new issue
Block a user