1- "use client" ;
2-
31import React , { memo , forwardRef , useId } from "react" ;
42import { fr } from "./fr" ;
53import { symToStr } from "tsafe/symToStr" ;
6- import { createComponentI18nApi } from "./i18n/createComponentI18nApi" ;
7- import { useLang } from "./i18n/useLang" ;
4+ import { createComponentI18nApi } from "./i18n" ;
85import { cx } from "./tools/cx" ;
96import type { Equals } from "tsafe" ;
107import { assert } from "tsafe/assert" ;
@@ -31,7 +28,7 @@ export const headerFooterDisplayItem: HeaderProps.QuickAccessItem.Button &
3128 "iconId" : "fr-icon-theme-fill" ,
3229 "text" : ( ( ) => {
3330 function Text ( ) {
34- const { t } = getTranslation ( useLang ( ) ) ;
31+ const { t } = useTranslation ( ) ;
3532 return < > { t ( "display settings" ) } </ > ;
3633 }
3734
@@ -46,7 +43,7 @@ export const Display = memo(
4643
4744 assert < Equals < keyof typeof rest , never > > ( ) ;
4845
49- const { t } = getTranslation ( useLang ( ) ) ;
46+ const { t } = useTranslation ( ) ;
5047
5148 return (
5249 < dialog
@@ -115,7 +112,7 @@ const RadioGroup = memo((props: { theme: "dark" | "light" | "system" }) => {
115112
116113 const inputId = useId ( ) ;
117114
118- const { t } = getTranslation ( useLang ( ) ) ;
115+ const { t } = useTranslation ( ) ;
119116
120117 const pictogramUrl = getAssetUrl (
121118 ( ( ) => {
@@ -164,7 +161,7 @@ const RadioGroup = memo((props: { theme: "dark" | "light" | "system" }) => {
164161
165162RadioGroup . displayName = symToStr ( { RadioGroup } ) ;
166163
167- const { getTranslation , addDisplayTranslations } = createComponentI18nApi ( {
164+ const { useTranslation , addDisplayTranslations } = createComponentI18nApi ( {
168165 "componentName" : symToStr ( { Display } ) ,
169166 "frMessages" : {
170167 /* spell-checker: disable */
0 commit comments