Skip to content

Commit fb5e472

Browse files
author
Jin Ying
committed
AboutComponent: Minor layout changes
1 parent 400df48 commit fb5e472

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

src/components/about/TeamComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class TeamComponent extends Component {
4747

4848
return (
4949
partners.map((partner, index) => (
50-
<TeamVerticalCardComponent
50+
<TeamVerticalCardComponent key={index}
5151
name={partner.node.frontmatter.name}
5252
profilePicture={partner.node.frontmatter.profilePicture.relativePath}
5353
/>

src/components/about/TeamHorizontalCardComponent.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class TeamHorizontalCardComponent extends Component {
4040

4141
return (
4242
info.map((i, index) => (
43-
<Grid item xs={12} sm={9}>
43+
<Grid item xs={12} sm={9} key={index}>
4444
<div className={classes.root}>
4545
<Grid container>
4646
<Grid item sm={4} lg={3}>
@@ -50,11 +50,24 @@ class TeamHorizontalCardComponent extends Component {
5050
<Grid item sm={8} lg={9}>
5151
<Typography variant="body1" className={classes.name}>{i.node.frontmatter.name}</Typography>
5252
<Typography variant="subtitle2" className={classes.role}>{i.node.frontmatter.role}</Typography>
53-
<Typography variant="body2" className={classes.title}>{i.node.frontmatter.description}</Typography>
53+
54+
{
55+
i.node.frontmatter.description.split('\n').map(function (item, idx) {
56+
return (
57+
<React.Fragment key={idx}>
58+
<Typography variant="body2">
59+
{item}
60+
</Typography>
61+
<br />
62+
</React.Fragment>
63+
)
64+
})
65+
}
66+
5467
</Grid>
5568
</Grid>
5669
</div>
57-
</Grid>
70+
</Grid >
5871
))
5972
)
6073
}

src/components/about/TeamVerticalCardComponent.js

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,25 @@ import Image from '../commons/Image'
1010
const styles = theme => ({
1111
root: {
1212
marginBottom: '1.25rem',
13-
[theme.breakpoints.up('sm')]: {
14-
textAlign: 'center',
15-
marginBottom: '1.25rem'
16-
}
13+
textAlign: 'center',
1714
},
1815
profilePictureContainer: {
19-
width: '4.5rem',
20-
height: '4.5rem',
21-
marginBottom: '1.25rem',
22-
[theme.breakpoints.up('sm')]: {
23-
margin: '0 auto 1.25rem auto',
24-
},
16+
width: '5.5rem',
17+
height: '5.5rem',
18+
margin: '0 auto 1.25rem auto',
2519
[theme.breakpoints.up('md')]: {
26-
width: '5.5rem',
27-
height: '5.5rem'
20+
width: '6.25rem',
21+
height: '6.25rem'
2822
},
2923
},
3024
profilePicture: {
3125
borderRadius: '50%',
32-
width: '4.5rem',
33-
height: '4.5rem',
34-
[theme.breakpoints.up('md')]: {
35-
width: '5.5rem',
36-
height: '5.5rem'
37-
},
3826
},
3927
})
4028

4129
class TeamVerticalCardComponent extends Component {
4230
render() {
43-
const { name, profilePicture, club, role } = this.props;
31+
const { name, profilePicture } = this.props;
4432
const { classes } = this.props;
4533

4634
return (

0 commit comments

Comments
 (0)