);
- }
- }
-
//finally return the side panel
return (
-
Go to your profile
-
-
+
);
}
LoggedOutSidePanel() {
- //reset the other mode
- if (this.state.changedPassword) {
- this.setState({ changedPassword: false });
- }
-
//build the signup panel
let SignupPanel;
diff --git a/src/components/pages/profile.jsx b/src/components/pages/profile.jsx
index e0fb1bd..fcba12d 100644
--- a/src/components/pages/profile.jsx
+++ b/src/components/pages/profile.jsx
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
import queryString from 'query-string';
//panels
-import Logout from '../panels/logout.jsx';
+import CommonLinks from '../panels/common_links.jsx';
import PasswordChange from '../panels/password_change.jsx';
class Profile extends React.Component {
@@ -21,9 +21,7 @@ class Profile extends React.Component {
scientists: 0,
warning: ''
};
- }
- componentWillMount() {
this.sendRequest('/profilerequest', this.state.params.username ? this.state.params.username : this.props.username);
}
@@ -65,6 +63,7 @@ class Profile extends React.Component {
+
{this.state.warning}
@@ -143,9 +142,7 @@ class Profile extends React.Component {
//finally return the side panel
return (
-
Return home
-
- this.props.history.push('/')} />
+ } />
);
}
@@ -200,9 +197,7 @@ class Profile extends React.Component {
//finally return the side panel
return (
-
Return home
-
Go to { e.preventDefault(); this.sendRequest('/profilerequest', this.props.username); this.setWarning(''); this.props.history.push('/profile'); }}>your profile