forge
Explore
Log in

Don't you dare go Hollow

🧹 use shared PageHeader for the page header

Browse files at this commit

85410a9ed6b95a3fc07c51d2a2dfc1b3d42b8401Burak BoduroğluParent: 9f5a8a8
  • refactor
    • 🧹 use shared PageHeader for the page header
Show full message
refactor(marks): 🧹 use shared PageHeader for the page header

replace the bespoke <header> icon-chip block with <PageHeader>, matching
the 18 other pages; tab-dependent subtitle passed as description
src/pages/marks-page.tsxmodified+5 -13
@@ -6,6 +6,7 @@ import { Alert } from "@/components/ui/alert";
66 import { AttendanceReportView } from "@/components/attendance/attendance-report-view";
77 import { MarksReportView } from "@/components/marks/marks-report-view";
88 import { RouteGuard } from "@/components/layout/route-guard";
9+import { PageHeader } from "@/components/layout/page-header";
910 import { EmptyState } from "@/components/ui/empty-state";
1011 import { IconChart, IconClipboardCheck } from "@/components/ui/icons";
1112 import { PageSpinner } from "@/components/ui/page-spinner";
@@ -31,19 +32,10 @@ function MarksContent() {
3132
3233 return (
3334 <div class="space-y-5">
34- <header class="flex items-center gap-3 border-b border-border pb-5">
35- <span class="flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary">
36- <Show when={tab() === "marks"} fallback={<IconClipboardCheck class="h-5 w-5" />}>
37- <IconChart class="h-5 w-5" />
38- </Show>
39- </span>
40- <div class="min-w-0">
41- <h1 class="font-display text-2xl font-semibold tracking-tight">{t("marks.title")}</h1>
42- <p class="mt-0.5 text-sm text-muted-foreground">
43- {tab() === "marks" ? t("marks.subtitle") : t("attendance.subtitle")}
44- </p>
45- </div>
46- </header>
35+ <PageHeader
36+ title={t("marks.title")}
37+ description={tab() === "marks" ? t("marks.subtitle") : t("attendance.subtitle")}
38+ />
4739
4840 <Tabs
4941 class="space-y-4"