From c0065437a71506a18beba8dd6b27f371f9256a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 4 Jun 2026 19:12:03 +0200 Subject: [PATCH] refactor(settings): move unit-system and global injection-site exclusions to Account MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The unit-system selector and the app-wide injection-site exclusions are personal account preferences, not dashboard-layout controls. Move both cards from the Dashboard settings section to the Account section, next to the profile. The persistence path is unchanged — same endpoints, query keys, mutation hooks, and labels; only the render location moves. The Dashboard section keeps the layout/widget controls. --- src/components/settings/account-section.tsx | 9 +++++++++ src/components/settings/dashboard-section.tsx | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/settings/account-section.tsx b/src/components/settings/account-section.tsx index f02e6aea1..44b8c3f6a 100644 --- a/src/components/settings/account-section.tsx +++ b/src/components/settings/account-section.tsx @@ -53,6 +53,8 @@ import { restartOnboardingTour } from "@/lib/onboarding/tour-restart"; import { describePasskeyError } from "@/lib/passkey-errors"; import { queryKeys } from "@/lib/query-keys"; import { TimezonePicker } from "@/components/settings/timezone-picker"; +import { UnitPreferenceCard } from "@/components/settings/unit-preference-card"; +import { InjectionSitesCard } from "@/components/settings/injection-sites-card"; import { detectBrowserTimezone, DEFAULT_TIMEZONE } from "@/lib/tz/format"; interface PasskeyInfo { @@ -583,6 +585,13 @@ export function AccountSection() { + {/* Unit system + global injection-site exclusions live with the + account profile: both are personal preferences that apply + app-wide, not dashboard-layout controls. */} + + + + {/* Passkeys card */}
diff --git a/src/components/settings/dashboard-section.tsx b/src/components/settings/dashboard-section.tsx index 55ee5ff02..6914aaaac 100644 --- a/src/components/settings/dashboard-section.tsx +++ b/src/components/settings/dashboard-section.tsx @@ -1,14 +1,10 @@ "use client"; import { DashboardLayoutSection } from "@/components/settings/dashboard-layout-section"; -import { UnitPreferenceCard } from "@/components/settings/unit-preference-card"; -import { InjectionSitesCard } from "@/components/settings/injection-sites-card"; -import { useAuth } from "@/hooks/use-auth"; import { useTranslations } from "@/lib/i18n/context"; export function DashboardSection() { const { t } = useTranslations(); - const { isAuthenticated } = useAuth(); return (
- - - -
);