Cleaning the code
This commit is contained in:
1 parent
9ad4fb29ef
commit
cb365c2920
6 files changed
+11
-19
No files matched your search
+1
-1
@@ -11,7 +11,7 @@ import { Route, BrowserRouter, Switch } from 'react-router-dom'
|
||||
|
||||
// Material UI
|
||||
|
||||
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles'
|
||||
import { MuiThemeProvider } from '@material-ui/core/styles'
|
||||
import theme from './theme'
|
||||
|
||||
// Components
|
||||
|
||||
@@ -2,7 +2,6 @@ import React, { Component } from 'react'
|
||||
import { compose } from 'recompose'
|
||||
import { withStyles } from '@material-ui/core/styles'
|
||||
import {LineChart} from 'react-easy-chart'
|
||||
import Paper from '@material-ui/core/Paper'
|
||||
import Grid from '@material-ui/core/Grid'
|
||||
import Typography from '@material-ui/core/Typography'
|
||||
import CssBaseline from '@material-ui/core/CssBaseline'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { Component } from 'react'
|
||||
import UserSearch from './UserSearch'
|
||||
import {graphql, compose} from 'react-apollo'
|
||||
import {compose} from 'react-apollo'
|
||||
|
||||
// Materia UI
|
||||
|
||||
|
||||
@@ -143,7 +143,9 @@ class UserList extends Component {
|
||||
</Button>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
<Paper className={classes.root}>
|
||||
<UserProfile userId={this.state.selected}/>
|
||||
</Paper>
|
||||
</Dialog>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
|
||||
@@ -24,15 +24,14 @@ const styles = theme => ({
|
||||
margin: 2
|
||||
},
|
||||
card: {
|
||||
maxWidth: 800,
|
||||
minWidth: 800,
|
||||
width: '80%',
|
||||
paddingTop: '30'
|
||||
},
|
||||
media: {
|
||||
height: 0,
|
||||
paddingTop: '56.25%', // 16:9,
|
||||
marginTop: '30',
|
||||
minWidth: 800
|
||||
minWidth: '80%'
|
||||
},
|
||||
grid: {
|
||||
paddingTop: '30',
|
||||
@@ -94,11 +93,9 @@ class UserProfile extends Component {
|
||||
render () {
|
||||
const { classes } = this.props
|
||||
return (
|
||||
<Paper className={classes.root}>
|
||||
<Grid container justify='center' spacing={24}>
|
||||
{this.displayUserProfile()}
|
||||
</Grid>
|
||||
</Paper>
|
||||
<Grid container justify='center' spacing={24}>
|
||||
{this.displayUserProfile()}
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,9 +10,6 @@ import UserProfile from './UserProfile'
|
||||
// Material-ui
|
||||
|
||||
import { withStyles } from '@material-ui/core/styles'
|
||||
import MenuItem from '@material-ui/core/MenuItem'
|
||||
import TextField from '@material-ui/core/TextField'
|
||||
import Button from '@material-ui/core/Button'
|
||||
import Paper from '@material-ui/core/Paper'
|
||||
import Typography from '@material-ui/core/Typography'
|
||||
|
||||
@@ -59,9 +56,7 @@ class UserReferrals extends Component {
|
||||
}
|
||||
|
||||
userSelected (referrerUser) {
|
||||
console.log(user)
|
||||
|
||||
this.setState({referrer: referrerUser.id})
|
||||
this.setState({referrerId: referrerUser.id})
|
||||
|
||||
this.props.updateReferrerMutation({
|
||||
variables: {
|
||||
@@ -81,9 +76,8 @@ class UserReferrals extends Component {
|
||||
|
||||
renderMode () {
|
||||
const { classes } = this.props
|
||||
const {user} = this.props.data
|
||||
|
||||
if (this.state.referrerId !== '') {
|
||||
if (this.state.referrerId !== null) {
|
||||
return (
|
||||
<div>
|
||||
<Typography className={classes.typography} variant='body1' gutterBottom align='left'>
|
||||
|
||||
Reference in new issue
Block a user