1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00

refactor: 🔨 add home page link to logo in the header

This commit is contained in:
Meeeeow 2017-07-10 01:31:18 +08:00 committed by Juan Picado @jotadeveloper
parent fd2821fb92
commit beafd31cab
No known key found for this signature in database
GPG Key ID: 18AC54485952D158

@ -1,9 +1,10 @@
import React from 'react';
import {Button, Dialog, Input, MessageBox} from 'element-react';
import { Button, Dialog, Input, MessageBox } from 'element-react';
import styled from 'styled-components';
import API from '../../../utils/api';
import storage from '../../../utils/storage';
import _ from 'lodash';
import { Link } from 'react-router-dom';
import classes from './header.scss';
@ -97,7 +98,7 @@ export default class Header extends React.Component {
renderUserActionButton () {
if (!this.isTokenExpire) { // TODO: Check jwt token expire
return (
<div className={classes.welcome}>
<div className={ classes.welcome }>
Hi, {storage.getItem('username')}
&nbsp;
<Button type="danger" onClick={this.handleLogout}>Logout</Button>
@ -112,7 +113,9 @@ export default class Header extends React.Component {
return (
<header className={ classes.header }>
<div className={ classes.headerWrap }>
<img src={ logo } className={ classes.logo } />
<Link to="/">
<img src={ logo } className={ classes.logo } />
</Link>
<SetupGuide>
npm set registry { location.origin }
<br/>