mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
refactor: 🔨 add home page link to logo in the header
This commit is contained in:
parent
fd2821fb92
commit
beafd31cab
1 changed files with 6 additions and 3 deletions
|
@ -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')}
|
||||
|
||||
<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/>
|
||||
|
|
Loading…
Reference in a new issue