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:
parent
fd2821fb92
commit
beafd31cab
@ -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')}
|
||||||
|
|
||||||
<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 }>
|
||||||
|
<Link to="/">
|
||||||
<img src={ logo } className={ classes.logo } />
|
<img src={ logo } className={ classes.logo } />
|
||||||
|
</Link>
|
||||||
<SetupGuide>
|
<SetupGuide>
|
||||||
npm set registry { location.origin }
|
npm set registry { location.origin }
|
||||||
<br/>
|
<br/>
|
||||||
|
Loading…
Reference in New Issue
Block a user