Simplified CommonLinks

This commit is contained in:
2019-05-26 23:46:05 +10:00
parent 972a3a7ea7
commit c569d99aed
4 changed files with 54 additions and 66 deletions
+3 -24
View File
@@ -17,34 +17,13 @@ class Home extends React.Component {
//rendering function
render() {
//get the correct side panel
let SidePanel;
if (this.props.id) { //logged in
SidePanel = () => {
return (
<div className='sidePanel'>
<CommonLinks />
</div>
);
}
} else { //logged out
SidePanel = () => {
return (
<div className='sidePanel'>
<p><Link to='/signup'>Sign Up</Link></p>
<p><Link to='/login'>Login</Link></p>
<p><Link to='/passwordrecover'>Recover Password</Link></p>
</div>
);
}
}
//return the home page
return (
<div className='page'>
<div className='sidePanelPage'>
<SidePanel />
<div className='sidePanel'>
<CommonLinks />
</div>
<div className='mainPanel'>
<Blurb />