mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 13:22:14 +00:00
fix(insights): point the ECG cross-link at the routed sub-page
Repoint EcgCrossLink from the overview `#ecg` fragment to `/insights/ecg`. The fragment is absent until the overview section's own fetch resolves, so the deep link no-oped on navigation (UX-flows finding F1-1); the routed sub-page always mounts.
This commit is contained in:
1 parent
adf80da989
commit
4ca34d4b00
3 files changed
+7
-5
No files matched your search
@@ -89,12 +89,12 @@ describe("EcgCrossLink mount on Heart sub-pages (H1)", () => {
|
||||
it("mounts the ECG cross-link on the resting-pulse page", () => {
|
||||
const html = render(<RestingPulsePage />);
|
||||
expect(html).toContain('data-slot="ecg-cross-link"');
|
||||
expect(html).toContain('href="/insights#ecg"');
|
||||
expect(html).toContain('href="/insights/ecg"');
|
||||
});
|
||||
|
||||
it("mounts the ECG cross-link on the HRV page", () => {
|
||||
const html = render(<HrvPage />);
|
||||
expect(html).toContain('data-slot="ecg-cross-link"');
|
||||
expect(html).toContain('href="/insights#ecg"');
|
||||
expect(html).toContain('href="/insights/ecg"');
|
||||
});
|
||||
});
|
||||
@@ -62,7 +62,7 @@ describe("<EcgCrossLink>", () => {
|
||||
hasRecordings: true,
|
||||
});
|
||||
expect(html).toContain('data-slot="ecg-cross-link"');
|
||||
expect(html).toContain('href="/insights#ecg"');
|
||||
expect(html).toContain('href="/insights/ecg"');
|
||||
expect(html).toContain("2 recordings on file.");
|
||||
// The latest (first) recording's DEVICE result, attributed to the device.
|
||||
expect(html).toContain("Latest device result:");
|
||||
|
||||
@@ -13,7 +13,9 @@ import { TileHeader } from "@/components/insights/tile-header";
|
||||
|
||||
/**
|
||||
* S10 — ECG cross-link, the pointer from the resting-HR / pulse context into
|
||||
* the ECG viewer (`/insights#ecg`).
|
||||
* the ECG viewer (`/insights/ecg`). Points at the routed sub-page, which
|
||||
* always mounts, rather than the overview `#ecg` fragment, which is absent
|
||||
* until the overview section's own fetch resolves (UX-flows finding F1-1).
|
||||
*
|
||||
* NON-DIAGNOSTIC (load-bearing, mirrors `EcgSection` / `RhythmEventsCard`): the
|
||||
* card surfaces ONLY that recordings exist + the RECORDING DEVICE's OWN latest
|
||||
@@ -86,7 +88,7 @@ export function EcgCrossLink({ enabled = true, className }: EcgCrossLinkProps) {
|
||||
|
||||
return (
|
||||
<Link
|
||||
href="/insights#ecg"
|
||||
href="/insights/ecg"
|
||||
data-slot="ecg-cross-link"
|
||||
className={cn(
|
||||
// `.metric-accent` — the heart-family identity edge (`--tile-strain`,
|
||||
|
||||
Reference in new issue
Block a user