Files
HealthLog/src/components/settings/settings-hub-back-link.tsx
T
Marc-André Bombeck f564cdeef7 revert(settings): restore the flat settings navigation
Revert the nine-group consolidation and the card relocations back to the
flat sidebar: sessions, trusted devices, and login activity return to
Privacy, and account deletion returns inline under Advanced. Drop the
/settings/layout redirect and the now-unused group and sign-in cross-link
i18n keys across all six locales.

Keep the collapse-by-default sessions and activity cards, the medical-history
cross-link from "About me", and the chronic-conditions consolidation.
2026-06-29 07:12:10 +02:00

40 lines
1.2 KiB
TypeScript

"use client";
import Link from "next/link";
import { ChevronLeft } from "lucide-react";
import { cn } from "@/lib/utils";
import { useTranslations } from "@/lib/i18n/context";
/**
* v1.17.1 (N-5) — the up-affordance for a hub child editor.
*
* The four Layout personalization editors (dashboard / insights /
* medications / mood) are reached through the "Layout & Personalization"
* hub (or a page-header cog), and the left rail highlights the hub while
* the body shows the child. The return path existed only implicitly (tap
* the highlighted rail entry); this is the explicit "← back to hub" link
* at the top of the child, so the hub → child → hub loop reads clearly,
* especially on mobile where the rail collapses to a chip strip.
*/
export function SettingsHubBackLink({
href,
labelKey,
}: {
href: string;
labelKey: string;
}) {
const { t } = useTranslations();
return (
<Link
href={href}
className={cn(
"text-muted-foreground hover:text-foreground -mx-1 inline-flex w-fit items-center gap-1 rounded-md px-1 py-0.5 text-xs font-medium transition-colors",
)}
>
<ChevronLeft className="h-3.5 w-3.5 shrink-0" aria-hidden="true" />
{t(labelKey)}
</Link>
);
}