diff --git a/src/components/ProfilePage.jsx b/src/components/ProfilePage.jsx
index a8a7054..4524518 100644
--- a/src/components/ProfilePage.jsx
+++ b/src/components/ProfilePage.jsx
@@ -24,6 +24,7 @@ import SocialLinks from './ProfilePage/SocialLinks';
import Bio from './ProfilePage/Bio';
import Certificates from './ProfilePage/Certificates';
import AgeMessage from './ProfilePage/AgeMessage';
+import DateJoined from './ProfilePage/DateJoined';
export class ProfilePage extends React.Component {
constructor(props) {
@@ -71,7 +72,7 @@ export class ProfilePage extends React.Component {
render() {
const {
- profileImage, username, errors,
+ profileImage, username, dateJoined, errors,
} = this.props;
const commonFormProps = {
@@ -98,7 +99,7 @@ export class ProfilePage extends React.Component {
/>
{username}
-
Member since 2017
+
@@ -137,6 +138,7 @@ ProfilePage.propTypes = {
// Profile data
username: PropTypes.string,
+ dateJoined: PropTypes.string,
profileImage: PropTypes.string,
accountPrivacy: PropTypes.string,
certificates: PropTypes.arrayOf(PropTypes.shape({
@@ -187,6 +189,7 @@ ProfilePage.defaultProps = {
visibility: {}, // eslint-disable-line
yearOfBirth: null,
requiresParentalConsent: null,
+ dateJoined: null,
};
const mapStateToProps = (state) => {
@@ -211,6 +214,7 @@ const mapStateToProps = (state) => {
visibility: state.profilePage.preferences.visibility || {},
yearOfBirth: state.profilePage.account.yearOfBirth,
requiresParentalConsent: state.profilePage.account.requiresParentalConsent,
+ dateJoined: state.profilePage.account.dateJoined,
};
};
diff --git a/src/components/ProfilePage/DateJoined.jsx b/src/components/ProfilePage/DateJoined.jsx
new file mode 100644
index 0000000..b2651d9
--- /dev/null
+++ b/src/components/ProfilePage/DateJoined.jsx
@@ -0,0 +1,29 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { FormattedMessage, FormattedDate } from 'react-intl';
+
+function DateJoined({ date }) {
+ if (date == null) return null;
+
+ return (
+ ,
+ }}
+ tagName="p"
+ className="mb-0"
+ />
+ );
+}
+
+DateJoined.propTypes = {
+ date: PropTypes.string,
+};
+DateJoined.defaultProps = {
+ date: null,
+};
+
+export default DateJoined;