mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 21:48:04 -05:00
Injimob 2277 handle expired vc (#1679)
* [INJIMOB-2272]: Expired Vc UI changes based on error code Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com> * [INJIMOB-2272]: Hide activation from Kebab Popup and activation icons for Expired Vcs. Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com> * [INJIMOB-2277]: Combine the actions for verified and expired flag.Update kebabmenu options condition. Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com> * [INJIMOB-2277]: Update VcVerification props to accept vcMetadata. Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com> --------- Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>
This commit is contained in:
@@ -7,10 +7,23 @@ import React from 'react';
|
||||
import {useTranslation} from 'react-i18next';
|
||||
import PendingIcon from './PendingIcon';
|
||||
|
||||
export const VCVerification: React.FC = ({wellknown, isVerified}: any) => {
|
||||
export const VCVerification: React.FC = ({wellknown, vcMetadata}: any) => {
|
||||
const {t} = useTranslation('VcDetails');
|
||||
const statusText = isVerified ? t('valid') : t('pending');
|
||||
const statusIcon = isVerified ? <VerifiedIcon /> : <PendingIcon />;
|
||||
const statusText = vcMetadata.isVerified
|
||||
? vcMetadata.isExpired
|
||||
? t('expired')
|
||||
: t('valid')
|
||||
: t('pending');
|
||||
|
||||
const statusIcon = vcMetadata.isVerified ? (
|
||||
vcMetadata.isExpired ? (
|
||||
<PendingIcon />
|
||||
) : (
|
||||
<VerifiedIcon />
|
||||
)
|
||||
) : (
|
||||
<PendingIcon />
|
||||
);
|
||||
return (
|
||||
<Row
|
||||
{...testIDProps('verified')}
|
||||
|
||||
Reference in New Issue
Block a user