**) Fix TPA Alert messages

**) Fix TPA options incorrect text

VAN-297
This commit is contained in:
Adeel Khan
2021-01-31 00:58:25 +05:00
parent 48a3480f4e
commit 9333da2df7
4 changed files with 6 additions and 26 deletions

View File

@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { FormattedMessage } from '@edx/frontend-platform/i18n';
import { Alert } from '@edx/paragon';
import { LOGIN_PAGE } from '../data/constants';
import { LOGIN_PAGE, REGISTER_PAGE } from '../data/constants';
const ThirdPartyAuthAlert = (props) => {
const { currentProvider, referrer, platformName } = props;
@@ -29,7 +29,7 @@ const ThirdPartyAuthAlert = (props) => {
);
}
return <Alert id="tpa-alert" className="alert-success mt-n2">{ message }</Alert>;
return <Alert id="tpa-alert" className={referrer === REGISTER_PAGE ? 'alert-success mt-n2' : 'alert-warning mt-n2'}>{ message }</Alert>;
};
ThirdPartyAuthAlert.defaultProps = {

View File

@@ -2,7 +2,7 @@
exports[`ThirdPartyAuthAlert should match login page third party auth alert message snapshot 1`] = `
<div
className="fade alert-success mt-n2 alert show"
className="fade alert-warning mt-n2 alert show"
id="tpa-alert"
role="alert"
>
@@ -14,7 +14,7 @@ exports[`ThirdPartyAuthAlert should match login page third party auth alert mess
exports[`ThirdPartyAuthAlert should match register page third party auth alert message snapshot 1`] = `
<div
className="fade alert-success mt-n2 alert show"
className="fade alert-warning mt-n2 alert show"
id="tpa-alert"
role="alert"
>