Some checks are pending
E2E / Playwright e2e (push) Waiting to run
- Replaced hardcoded "Agenda" labels with dynamic ULTICAL_APP_NAME in various components for consistency. - Introduced new AiUsageSection and CompteAiUsageSection components to track AI usage and costs. - Updated settings and metadata to reflect changes in AI cost policies and usage limits. - Enhanced user interface elements for better accessibility and user experience across admin settings.
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
"use client"
|
|
|
|
import {
|
|
resolveCompteSettingsSection,
|
|
type CompteSettingsSectionId,
|
|
} from "@/lib/compte-settings/settings-nav"
|
|
import { CompteHomeSection } from "@/components/compte/sections/compte-home-section"
|
|
import { ComptePersonalInfoSection } from "@/components/compte/sections/compte-personal-info-section"
|
|
import { CompteSecuritySection } from "@/components/compte/sections/compte-security-section"
|
|
import { CompteAiUsageSection } from "@/components/compte/sections/compte-ai-usage-section"
|
|
|
|
const SECTIONS: Record<CompteSettingsSectionId, React.ComponentType> = {
|
|
home: CompteHomeSection,
|
|
"personal-info": ComptePersonalInfoSection,
|
|
security: CompteSecuritySection,
|
|
"usage-ia": CompteAiUsageSection,
|
|
}
|
|
|
|
export function CompteSettingsSectionView({
|
|
sectionId,
|
|
}: {
|
|
sectionId: CompteSettingsSectionId
|
|
}) {
|
|
const Section = SECTIONS[sectionId]
|
|
return <Section />
|
|
}
|
|
|
|
export function CompteSettingsSectionFromSegments({
|
|
segments,
|
|
}: {
|
|
segments?: string[]
|
|
}) {
|
|
const sectionId = resolveCompteSettingsSection(segments)
|
|
return <CompteSettingsSectionView sectionId={sectionId} />
|
|
}
|