mirror of
https://github.com/status-im/liquid-funding.git
synced 2025-02-12 03:17:25 +00:00
don't display title at home
This commit is contained in:
parent
3618b034a1
commit
b97ba5ea28
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Route, Link, Switch } from 'react-router-dom'
|
import { Route, Link, Switch, withRouter } from 'react-router-dom'
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { withStyles } from '@material-ui/core/styles';
|
import { withStyles } from '@material-ui/core/styles';
|
||||||
@ -150,8 +150,9 @@ class PersistentDrawerLeft extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { classes, theme, loading, account, enableEthereum } = this.props
|
const { classes, theme, loading, account, enableEthereum, location: { pathname } } = this.props
|
||||||
const { open } = this.state
|
const { open } = this.state
|
||||||
|
const isHome = pathname === "/"
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
@ -178,9 +179,9 @@ class PersistentDrawerLeft extends React.Component {
|
|||||||
/>}
|
/>}
|
||||||
{!loading && <MenuIcon/>}
|
{!loading && <MenuIcon/>}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<Typography className={classes.menuText} variant="h6" noWrap>
|
{!isHome && <Typography className={classes.menuText} variant="h6" noWrap>
|
||||||
Liquid Funding
|
Liquid Funding
|
||||||
</Typography>
|
</Typography>}
|
||||||
<Typography className={classNames(classes.connect, {[classes.connected]: !!account})} onClick={!account ? enableEthereum : console.log}>
|
<Typography className={classNames(classes.connect, {[classes.connected]: !!account})} onClick={!account ? enableEthereum : console.log}>
|
||||||
{!!account && <div className={classes.connectedText}>
|
{!!account && <div className={classes.connectedText}>
|
||||||
<div className={classes.accountText}>{formatAccount(account)}</div>
|
<div className={classes.accountText}>{formatAccount(account)}</div>
|
||||||
@ -252,7 +253,9 @@ PersistentDrawerLeft.propTypes = {
|
|||||||
theme: PropTypes.object.isRequired,
|
theme: PropTypes.object.isRequired,
|
||||||
loading: PropTypes.bool.isRequired,
|
loading: PropTypes.bool.isRequired,
|
||||||
account: PropTypes.string,
|
account: PropTypes.string,
|
||||||
enableEthereum: PropTypes.func.isRequired
|
enableEthereum: PropTypes.func.isRequired,
|
||||||
|
location: PropTypes.object
|
||||||
};
|
};
|
||||||
|
|
||||||
export default withStyles(styles, { withTheme: true })(PersistentDrawerLeft)
|
const DrawerWithRouter = withRouter(PersistentDrawerLeft)
|
||||||
|
export default withStyles(styles, { withTheme: true })(DrawerWithRouter)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user