24 lines
840 B
TypeScript
24 lines
840 B
TypeScript
import React from 'react';
|
|
import { Text } from '@fractal-ui/styling';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { LOCALE_NAME } from '../../core';
|
|
import { SOURCES } from '../constants';
|
|
import type { IViewProps } from '../interfaces';
|
|
|
|
const CONTENT = {
|
|
[SOURCES.DST]: 'sign.modal.cryptoInstallerModal.txt.tryAgainToRegCert',
|
|
[SOURCES.VERIFY]: 'sign.modal.cryptoInstallerModal.txt.tryAgainToCheckSignature',
|
|
[SOURCES.OTHER]: 'sign.modal.cryptoInstallerModal.txt.tryAgainToSign',
|
|
};
|
|
|
|
/**
|
|
* Компонент отобажающий результат установки КМ.
|
|
*/
|
|
export const InstallResult: React.FC<IViewProps> = ({ source }) => {
|
|
const { t } = useTranslation(LOCALE_NAME);
|
|
|
|
return <Text.P2 color={'text.secondary'}>{t(CONTENT[source])}</Text.P2>;
|
|
};
|
|
|
|
InstallResult.displayName = 'InstallResult';
|