diff --git a/src/components/cycle/cycle-view.tsx b/src/components/cycle/cycle-view.tsx index 8665fe1e4..0930fda56 100644 --- a/src/components/cycle/cycle-view.tsx +++ b/src/components/cycle/cycle-view.tsx @@ -1,9 +1,15 @@ "use client"; -import { useMemo, useState } from "react"; +import { useEffect, useMemo, useState } from "react"; import dynamic from "next/dynamic"; import { useSearchParams } from "next/navigation"; -import { Loader2, Plus, RefreshCw, Sparkles } from "lucide-react"; +import { + Loader2, + Plus, + RefreshCw, + SlidersHorizontal, + Sparkles, +} from "lucide-react"; import { Button } from "@/components/ui/button"; import { Card, CardContent } from "@/components/ui/card"; @@ -100,6 +106,14 @@ export function CycleView() { : "calendar"; }, [searchParams]); + // Controlled so the header "cycle settings" wrench (parity with the + // labs/medications/illness modules, which expose a customize glyph) can jump + // to the settings tab; a `?tab=` deep-link change still switches too. + const [tab, setTab] = useState(initialTab); + useEffect(() => { + setTab(initialTab); + }, [initialTab]); + const today = useMemo(() => shiftToday(0), []); const from = useMemo(() => shiftToday(-90), []); const to = useMemo(() => shiftToday(180), []); @@ -158,13 +172,26 @@ export function CycleView() { title={{t("cycle.title")}} description={t("cycle.subtitle")} actions={ - + <> + + + } /> @@ -266,7 +293,7 @@ export function CycleView() { ) : null} - + setTab(v as CycleTab)}> {/* v1.15.10 — the four German labels (Kalender/Prognosen/ Erkenntnisse/Einstellungen) overflowed the `flex-1` equal-width cells at 375 px and forced a horizontal scroll. Below `sm` the diff --git a/src/components/onboarding/source-card-grid.tsx b/src/components/onboarding/source-card-grid.tsx index de0f4375c..6ba4305d9 100644 --- a/src/components/onboarding/source-card-grid.tsx +++ b/src/components/onboarding/source-card-grid.tsx @@ -170,7 +170,15 @@ export function SourceCardGrid() {