Add account settings url to age message.
This commit is contained in:
committed by
Adam Butterworth
parent
6f4753b7db
commit
f5c440c93b
@@ -1,9 +1,12 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { UncontrolledAlert } from 'reactstrap';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
function AgeMessage({ accountURL }) {
|
||||
import { configuration } from '../../config/environment';
|
||||
|
||||
const { ACCOUNT_SETTINGS_URL } = configuration;
|
||||
|
||||
function AgeMessage() {
|
||||
return (
|
||||
<UncontrolledAlert color="info">
|
||||
<FormattedMessage
|
||||
@@ -18,7 +21,7 @@ function AgeMessage({ accountURL }) {
|
||||
description="error message"
|
||||
tagName="p"
|
||||
/>
|
||||
<a href={accountURL}>
|
||||
<a href={ACCOUNT_SETTINGS_URL}>
|
||||
<FormattedMessage
|
||||
id="profile.age.set.date"
|
||||
defaultMessage="Set your date of birth"
|
||||
@@ -29,8 +32,4 @@ function AgeMessage({ accountURL }) {
|
||||
);
|
||||
}
|
||||
|
||||
AgeMessage.propTypes = {
|
||||
accountURL: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default AgeMessage;
|
||||
|
||||
@@ -2,6 +2,7 @@ export const configuration = {
|
||||
BASE_URL: process.env.BASE_URL,
|
||||
LMS_BASE_URL: process.env.LMS_BASE_URL,
|
||||
LOGIN_URL: process.env.LOGIN_URL,
|
||||
ACCOUNT_SETTINGS_URL: `${process.env.LMS_BASE_URL}/account/settings`,
|
||||
LOGOUT_URL: process.env.LOGOUT_URL,
|
||||
CSRF_TOKEN_API_PATH: process.env.CSRF_TOKEN_API_PATH,
|
||||
REFRESH_ACCESS_TOKEN_ENDPOINT: process.env.REFRESH_ACCESS_TOKEN_ENDPOINT,
|
||||
|
||||
Reference in New Issue
Block a user