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