forge
Explore
Log in

Don't you dare go Hollow

🧹 add shared PageHeader to the page

Browse files at this commit

7122d71744bea23bd00bcfe91b997c19fba1e4d6Burak BoduroğluParent: 85410a9
  • refactor
    • 🧹 add shared PageHeader to the page
Show full message
refactor(work-log): 🧹 add shared PageHeader to the page

page had no top-level header; add <PageHeader title/description> to match
convention. the status <h2> stays — it is a live check-in widget, not a
page title. drop the now-duplicate DataTable description
src/pages/work-log-page.tsxmodified+3 -1
@@ -5,6 +5,7 @@ import { postWorkCheckIn } from "@/api/work";
5 import { postWorkCheckOut } from "@/api/work";5 import { postWorkCheckOut } from "@/api/work";
6 import { formatApiError } from "@/api/client";6 import { formatApiError } from "@/api/client";
7 import { RouteGuard } from "@/components/layout/route-guard";7 import { RouteGuard } from "@/components/layout/route-guard";
8+import { PageHeader } from "@/components/layout/page-header";
8 import { Alert } from "@/components/ui/alert";9 import { Alert } from "@/components/ui/alert";
9 import { Badge } from "@/components/ui/badge";10 import { Badge } from "@/components/ui/badge";
10 import { Button } from "@/components/ui/button";11 import { Button } from "@/components/ui/button";
@@ -97,6 +98,8 @@ function WorkLogContent() {
97 98
98 return (99 return (
99 <div class="space-y-6">100 <div class="space-y-6">
101+ <PageHeader title={t("work.title")} description={t("work.subtitle")} />
102+
100 <Show when={flash()}>103 <Show when={flash()}>
101 <Alert variant="success">{flash()}</Alert>104 <Alert variant="success">{flash()}</Alert>
102 </Show>105 </Show>
@@ -129,7 +132,6 @@ function WorkLogContent() {
129 >132 >
130 <DataTable133 <DataTable
131 title={t("work.entries")}134 title={t("work.entries")}
132- description={t("work.subtitle")}
133 actions={<Badge variant="secondary" class="mono rounded-lg px-3 py-1">{total()}</Badge>}135 actions={<Badge variant="secondary" class="mono rounded-lg px-3 py-1">{total()}</Badge>}
134 columns={columns()}136 columns={columns()}
135 data={pageItems()}137 data={pageItems()}