diff --git a/plugins/index.js b/plugins/index.js
index e7c234cad..1dbf8fae7 100644
--- a/plugins/index.js
+++ b/plugins/index.js
@@ -13,3 +13,6 @@ export {
export {
IFRAME_PLUGIN,
} from './data/constants';
+export {
+ default as PluginErrorBoundary,
+} from './PluginErrorBoundary';
diff --git a/src/profile/ProfilePluginPage.jsx b/src/profile/ProfilePluginPage.jsx
index b1b1baad8..9a35bad8c 100644
--- a/src/profile/ProfilePluginPage.jsx
+++ b/src/profile/ProfilePluginPage.jsx
@@ -1,31 +1,30 @@
+/* eslint-disable react/prop-types */
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { ensureConfig } from '@edx/frontend-platform';
-import { AppContext, ErrorBoundary } from '@edx/frontend-platform/react';
-import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
+import { AppContext } from '@edx/frontend-platform/react';
+import { injectIntl, intlShape, FormattedDate } from '@edx/frontend-platform/i18n';
+
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faTwitter, faFacebook, faLinkedin } from '@fortawesome/free-brands-svg-icons';
+import {
+ ActionRow, Avatar, Card, Hyperlink, Icon,
+} from '@edx/paragon';
+import { HistoryEdu, VerifiedUser } from '@edx/paragon/icons';
+
+import get from 'lodash.get';
+
+import PluginCountry from './forms/PluginCountry';
import { Plugin } from '../../plugins';
// Actions
import {
fetchProfile,
- saveProfile,
- saveProfilePhoto,
- deleteProfilePhoto,
- openForm,
- closeForm,
- updateDraft,
} from './data/actions';
// Components
-import ProfileAvatar from './forms/ProfileAvatar';
-import Name from './forms/Name';
-import Country from './forms/Country';
-import Education from './forms/Education';
-import SocialLinks from './forms/SocialLinks';
-import Bio from './forms/Bio';
-import DateJoined from './DateJoined';
import PageLoading from './PageLoading';
// Selectors
@@ -33,6 +32,7 @@ import { profilePageSelector } from './data/selectors';
// i18n
import messages from './ProfilePage.messages';
+import eduMessages from './forms/Education.messages';
import withParams from '../utils/hoc';
@@ -45,143 +45,99 @@ function Fallback() {
);
}
-class ProfilePluginPage extends React.Component {
- constructor(props, context) {
- super(props, context);
-
- this.handleSaveProfilePhoto = this.handleSaveProfilePhoto.bind(this);
- this.handleDeleteProfilePhoto = this.handleDeleteProfilePhoto.bind(this);
- this.handleClose = this.handleClose.bind(this);
- this.handleOpen = this.handleOpen.bind(this);
- this.handleSubmit = this.handleSubmit.bind(this);
- this.handleChange = this.handleChange.bind(this);
- }
+const platformDisplayInfo = {
+ facebook: {
+ icon: faFacebook,
+ name: '',
+ },
+ twitter: {
+ icon: faTwitter,
+ name: '',
+ },
+ linkedin: {
+ icon: faLinkedin,
+ name: '',
+ },
+};
+class ProfilePluginPage extends React.Component {
componentDidMount() {
this.props.fetchProfile(this.props.params.username);
}
- handleSaveProfilePhoto(formData) {
- this.props.saveProfilePhoto(this.context.authenticatedUser.username, formData);
- }
-
- handleDeleteProfilePhoto() {
- this.props.deleteProfilePhoto(this.context.authenticatedUser.username);
- }
-
- handleClose(formId) {
- this.props.closeForm(formId);
- }
-
- handleOpen(formId) {
- this.props.openForm(formId);
- }
-
- handleSubmit(formId) {
- this.props.saveProfile(formId, this.context.authenticatedUser.username);
- }
-
- handleChange(name, value) {
- this.props.updateDraft(name, value);
- }
-
- // Inserted into the DOM in two places (for responsive layout)
- renderHeadingLockup() {
- const { dateJoined } = this.props;
- return (
-
+ since
+ {intl.formatMessage(get(
+ eduMessages,
+ `profile.education.levels.${levelOfEducation}`,
+ eduMessages['profile.education.levels.o'],
+ ))}
+ {this.props.params.username}
-
-
-
- );
- }
-
renderContent() {
const {
profileImage,
- name,
- visibilityName,
country,
- visibilityCountry,
levelOfEducation,
- visibilityLevelOfEducation,
socialLinks,
- visibilitySocialLinks,
- bio,
- visibilityBio,
isLoadingProfile,
+ dateJoined,
+ intl,
} = this.props;
if (isLoadingProfile) {
return {this.props.params.username}
+
{countryMessages[country]}
+