Web: Client: Data Import: translate NoEmailUsersBlock to ts

This commit is contained in:
Vladimir Khvan 2024-06-21 15:12:15 +05:00
parent 5f67cad1dd
commit 96957e8f5e
3 changed files with 9 additions and 15 deletions

View File

@ -127,11 +127,7 @@ const AddEmailsStep = (props: AddEmailsStepProps) => {
return (
<Wrapper>
{users.withoutEmail.length > 0 && (
<NoEmailUsersBlock
t={t}
users={users.withoutEmail.length}
isCurrentStep
/>
<NoEmailUsersBlock t={t} users={users.withoutEmail.length} />
)}
{users.withoutEmail.length > 0 ? (

View File

@ -24,23 +24,16 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import React from "react";
import { Trans } from "react-i18next";
import { NoEmailUsersProps } from "../types";
export const NoEmailUsersBlock = ({ t, users, isCurrentStep }) => {
return isCurrentStep ? (
export const NoEmailUsersBlock = ({ t, users }: NoEmailUsersProps) => {
return (
<p className="users-without-email">
<Trans t={t} ns="Settings" i18nKey="AccountsWithoutEmails">
We found <b>{{ users }} users</b> without emails. You can fill their
emails or continue without this action.
</Trans>
</p>
) : (
<p className="users-without-email">
<Trans t={t} ns="Settings" i18nKey="AccountsWithoutEmailsNextStep">
We found <b>{{ users }} users</b> without emails. You can add necessary
data to their accounts on the next step.
</Trans>
</p>
);
};

View File

@ -400,3 +400,8 @@ export interface ImportSectionProps {
exportSection: Omit<ImportItemProps, "isChecked">;
importSection: Omit<ImportItemProps, "isChecked">;
}
export interface NoEmailUsersProps {
t: TFunciton;
users: number;
}