Adds proptypes to CredentialPluginTestAlert component

This commit is contained in:
mabashian 2020-06-18 16:22:53 -04:00
parent 9f8691dbea
commit 5cfca7896f
2 changed files with 11 additions and 5 deletions

View File

@ -158,9 +158,7 @@ function MetadataStep({ i18n }) {
id="credential-plugin-test"
variant="primary"
type="submit"
onClick={() =>
testPluginMetadata()
}
onClick={() => testPluginMetadata()}
>
{i18n._(t`Test`)}
</TestButton>

View File

@ -1,6 +1,7 @@
import React, { useEffect, useState } from 'react';
import { withI18n } from '@lingui/react';
import { t } from '@lingui/macro';
import { string, shape } from 'prop-types';
import {
Alert,
AlertActionCloseButton,
@ -75,8 +76,15 @@ function CredentialPluginTestAlert({
);
}
CredentialPluginTestAlert.propTypes = {};
CredentialPluginTestAlert.propTypes = {
credentialName: string.isRequired,
successResponse: shape({}),
errorResponse: shape({}),
};
CredentialPluginTestAlert.defaultProps = {};
CredentialPluginTestAlert.defaultProps = {
successResponse: null,
errorResponse: null,
};
export default withI18n()(CredentialPluginTestAlert);