Files
HealthLog/src/app/insights/steps/page.tsx
T

37 lines
1.3 KiB
TypeScript

"use client";
import { Footprints } from "lucide-react";
import { HealthKitMetricPage } from "@/components/insights/healthkit-metric-page";
/**
* v1.12 — `/insights/steps`.
*
* Daily step-count sub-page. Steps are stored as `ACTIVITY_STEPS`
* (cumulative per day; the server-side daily-stats helper collapses
* per-sample iOS posts into a single daily row). The metric already had
* a dashboard tile but was never listed in `sub-page-metric.ts`, so it
* never surfaced in the Insights tab strip / sub-page nav despite the
* user having step data. Reuses the generic HealthKitMetricPage scaffold;
* empty-state carries no manual-entry CTA — the series arrives from Apple
* Health or Withings sync.
*/
export default function InsightsStepsPage() {
return (
<HealthKitMetricPage
measurementType="ACTIVITY_STEPS"
statusMetric="STEPS"
insightMetric="ACTIVITY_STEPS"
chartKey="steps"
i18nPrefix="insights.steps"
statIcon={Footprints}
color="#50fa7b"
unit="steps"
yAxisUnit="steps"
emptyStateIcon={<Footprints className="size-6" />}
emptyStateCtaType={null}
coachPrefill="I haven't logged any steps yet — what's a reasonable daily step target, and how does walking more help my health?"
/>
);
}