mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 05:12:14 +00:00
Phase B6 commit 2 of 4.
* `thresholds-settings-section.tsx` (route wrapper) renamed to
`thresholds-section.tsx` so the filename + default export match
the slug — every other section in `src/components/settings/`
follows the `<slug>-section.tsx` `<SlugSection>` convention.
* The historic inner editor at `thresholds-section.tsx`
(`<ThresholdsSection>`) is moved out to
`thresholds-editor-section.tsx` (`<ThresholdsEditorSection>`)
so the names stop clashing.
* Rewrites three muddy section descriptions in EN + DE:
- account: lists every concern the section actually covers
- api: drops the misleading "headless clients" / "Drittanbieter"
framing for "your own scripts and apps"
- advanced: post-B7 there's no Import surface here — describes
the danger zone honestly.
No user-facing setting removed, no slug renamed, no i18n key removed.
Settings smoke tests still green; the route mount goes through
`<ThresholdsSection>` exactly as before, just from the renamed file.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
42 lines
1.4 KiB
TypeScript
42 lines
1.4 KiB
TypeScript
"use client";
|
|
|
|
import { ThresholdsEditorSection } from "@/components/settings/thresholds-editor-section";
|
|
import { useTranslations } from "@/lib/i18n/context";
|
|
|
|
/**
|
|
* `<ThresholdsSection>` — route-level wrapper for `/settings/thresholds`.
|
|
*
|
|
* v1.4.16 phase B6: file renamed from the historic
|
|
* `thresholds-settings-section.tsx` (`<ThresholdsSettingsSection>`) so the
|
|
* filename + default export match the slug — every other section in
|
|
* `src/components/settings/` follows the `<slug>-section.tsx`
|
|
* `<SlugSection>` convention. The inner editor card was simultaneously
|
|
* moved out of `thresholds-section.tsx` (where it used to live as
|
|
* `<ThresholdsSection>`) into `thresholds-editor-section.tsx`
|
|
* (`<ThresholdsEditorSection>`) so the names stop clashing.
|
|
*/
|
|
export function ThresholdsSection() {
|
|
const { t } = useTranslations();
|
|
|
|
return (
|
|
<section
|
|
aria-labelledby="settings-section-thresholds-title"
|
|
className="space-y-6"
|
|
>
|
|
<header className="space-y-1">
|
|
<h1
|
|
id="settings-section-thresholds-title"
|
|
className="text-2xl font-semibold tracking-tight"
|
|
>
|
|
{t("settings.sections.thresholds.title")}
|
|
</h1>
|
|
<p className="text-muted-foreground text-sm">
|
|
{t("settings.sections.thresholds.description")}
|
|
</p>
|
|
</header>
|
|
|
|
<ThresholdsEditorSection id="thresholds" />
|
|
</section>
|
|
);
|
|
}
|