0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00

fix(ui): fix i18n content (#2406)

This commit is contained in:
simeng-li 2022-11-11 15:18:46 +08:00 committed by GitHub
parent fc63b14974
commit c2e70e662a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
import { SignInIdentifier } from '@logto/schemas';
import { useTranslation } from 'react-i18next';
import { useParams, useLocation } from 'react-router-dom';
import { is } from 'superstruct';
@ -15,6 +16,7 @@ type Parameters = {
};
const SignInPassword = () => {
const { t } = useTranslation();
const { method } = useParams<Parameters>();
const { state } = useLocation();
const { signInMethods } = useSieMethods();
@ -42,7 +44,7 @@ const SignInPassword = () => {
title="description.enter_password"
description="description.enter_password_for"
descriptionProps={{
method: `description.${method === SignInIdentifier.Email ? 'email' : 'phone_number'}`,
method: t(`description.${method === SignInIdentifier.Email ? 'email' : 'phone_number'}`),
value:
method === SignInIdentifier.Email
? value