Skip to content

Commit

Permalink
[CE-243] Add link to dashboard in home page
Browse files Browse the repository at this point in the history
Add link to dashboard in home page.
Delete 4 navigation buttons from home page.

Change-Id: Ia9976cb24e8f36c0425776359c48f35f5d632af7
Signed-off-by: Huiying Gong <541176616@qq.com>
  • Loading branch information
huiyingGong committed Jan 19, 2018
1 parent f7f152b commit 4fd7d61
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
7 changes: 6 additions & 1 deletion user-dashboard/js/home/src/routes/Home/Content0.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import TweenOne from 'rc-tween-one';
import OverPack from 'rc-scroll-anim/lib/ScrollOverPack';

class Content extends React.Component {

goDashboard = () =>{
window.location.href = "/dashboard";
}

render() {
const props = { ...this.props };
delete props.isMode;
Expand Down Expand Up @@ -34,7 +39,7 @@ class Content extends React.Component {
>
BLOCKCHAIN FOR DEVELOPERS
</p>
<Button type="ghost" key="button" id={`${props.id}-button`}>
<Button type="ghost" key="button" id={`${props.id}-button`} onClick={this.goDashboard}>
MY DASHBOARD
</Button>
</QueueAnim>
Expand Down
26 changes: 13 additions & 13 deletions user-dashboard/js/home/src/routes/Home/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ class Header extends React.Component {
case 'login':
window.location.href = "/login";
break;
case '0':
window.location.href = "/dashboard/chain";
break;
case '1':
window.location.href = "/dashboard/contract";
break;
case '2':
window.location.href = "/dashboard/analytics";
break;
case '3':
window.location.href = "/dashboard/store";
break;
//case '0':
// window.location.href = "/dashboard/chain";
// break;
//case '1':
// window.location.href = "/dashboard/contract";
// break;
//case '2':
// window.location.href = "/dashboard/analytics";
// break;
//case '3':
// window.location.href = "/dashboard/store";
// break;
case 'profile':
onClickProfile();
break;
Expand All @@ -51,7 +51,7 @@ class Header extends React.Component {
const props = { ...this.props };
const isMode = props.isMode;
delete props.isMode;
let navData = { menu1: 'Chain', menu2: 'Smart Contract', menu3: 'Analytics', menu4: 'Store' };
let navData = { };
let navChildren = Object.keys(navData)
.map((key, i) => (<Item key={i}>{navData[key]}</Item>));
if (window.username !== '') {
Expand Down

0 comments on commit 4fd7d61

Please sign in to comment.