fix(language-selector):remove language description label on onboarding modal
- Updated LanguageSelector component to include a showDescription prop, allowing conditional rendering of the language description. - Modified the Intro component to set showDescription to false, streamlining the user interface in the new user guide. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
parent
e6b905c796
commit
d3b65ac033
|
|
@ -51,7 +51,7 @@ function Intro() {
|
|||
<Logo className="mx-auto size-20" />
|
||||
<p className="mt-5 text-2xl font-bold">{t("new_user_guide.intro.title")}</p>
|
||||
<p className="text-lg">{t("new_user_guide.intro.description")}</p>
|
||||
<LanguageSelector contentClassName="z-10" />
|
||||
<LanguageSelector contentClassName="z-10" showDescription={false} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -233,9 +233,12 @@ const VoiceSelector = () => {
|
|||
export const LanguageSelector = ({
|
||||
containerClassName,
|
||||
contentClassName,
|
||||
|
||||
showDescription = true,
|
||||
}: {
|
||||
containerClassName?: string
|
||||
contentClassName?: string
|
||||
showDescription?: boolean
|
||||
}) => {
|
||||
const { t } = useTranslation("settings")
|
||||
const language = useGeneralSettingSelector((state) => state.language)
|
||||
|
|
@ -252,7 +255,9 @@ export const LanguageSelector = ({
|
|||
<div className={cn("mb-3 mt-4 flex w-full items-center", containerClassName)}>
|
||||
<div className="flex grow flex-col gap-1">
|
||||
<span className="shrink-0 text-sm font-medium">{t("general.language.title")}</span>
|
||||
<SettingDescription>{t("general.language.description")}</SettingDescription>
|
||||
{showDescription && (
|
||||
<SettingDescription>{t("general.language.description")}</SettingDescription>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<ResponsiveSelect
|
||||
|
|
|
|||
Loading…
Reference in New Issue