Skip to content

Commit 6e1e789

Browse files
committed
fix: profile bug with styles
1 parent a0ae324 commit 6e1e789

2 files changed

Lines changed: 24 additions & 17 deletions

File tree

src/components/Profile/ProfileCard.js

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,19 @@ import ExpandMoreIcon from '@material-ui/icons/ExpandMore'
1414
import Grid from '@material-ui/core/Grid'
1515
import IconButton from '@material-ui/core/IconButton'
1616
import Typography from '@material-ui/core/Typography'
17-
import { withStyles, makeStyles } from '@material-ui/core/styles'
1817

18+
/*
1919
const useStyles = makeStyles({
20-
card: {
21-
minWidth: 275,
22-
},
23-
bigAvatar: {
24-
margin: 10,
25-
width: 60,
26-
height: 60,
27-
},
28-
})
20+
card: {
21+
minWidth: 275
22+
},
23+
bigAvatar: {
24+
margin: 10,
25+
width: 60,
26+
height: 60
27+
}
28+
});
29+
*/
2930

3031
class ProfileCard extends Component {
3132
constructor(props) {
@@ -42,14 +43,12 @@ class ProfileCard extends Component {
4243
}
4344

4445
render() {
45-
const { classes, user } = this.props
46+
const { user } = this.props
4647
const { expanded1, expanded2 } = this.state
4748
return (
48-
<Card className={classes.card}>
49+
<Card className="card">
4950
<CardHeader
50-
avatar={
51-
<Avatar className={classes.bigAvatar} src={user.selfieLink} />
52-
}
51+
avatar={<Avatar className="bigAvatar" src={user.selfieLink} />}
5352
title={user.name + ' ' + user.lastName}
5453
subheader="Usuario"
5554
/>
@@ -124,9 +123,8 @@ class ProfileCard extends Component {
124123
}
125124

126125
ProfileCard.propTypes = {
127-
classes: PropTypes.object.isRequired,
128126
user: PropTypes.object.isRequired,
129127
vehiculos: PropTypes.array.isRequired,
130128
}
131129

132-
export default withStyles(useStyles)(ProfileCard)
130+
export default ProfileCard

src/styles/main.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.bigAvatar {
2+
margin: 10px;
3+
width: 60px;
4+
height: 60px;
5+
}
6+
7+
.card {
8+
min-width: 275px;
9+
}

0 commit comments

Comments
 (0)