Broke up the home page

This commit is contained in:
2019-05-26 04:28:40 +10:00
parent f949617284
commit 6095261c27
14 changed files with 233 additions and 109 deletions
+1 -15
View File
@@ -6,7 +6,6 @@ import queryString from 'query-string';
//panels
import CommonLinks from '../panels/common_links.jsx';
import PasswordChange from '../panels/password_change.jsx';
class Profile extends React.Component {
constructor(props) {
@@ -124,23 +123,10 @@ class Profile extends React.Component {
//panel functions
MyProfileSidePanel() {
//build the password change panel
let PasswordChangePanel;
if (!this.state.changedPassword) {
PasswordChangePanel = () => {
return (<PasswordChange onPasswordChange={() => { this.setState({changedPassword: true}) }} />);
}
} else {
PasswordChangePanel = () => {
return (<p>Password changed!</p>);
}
}
//finally return the side panel
return (
<div className='sidePanel'>
<CommonLinks extra={() => <PasswordChangePanel />} />
<CommonLinks />
</div>
);
}