Skip to content

Commit

Permalink
fixed button margins
Browse files Browse the repository at this point in the history
  • Loading branch information
xutianyish committed Dec 7, 2020
1 parent d04a813 commit 9f5f583
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions client/src/components/viewProfile/viewProfile.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ViewProfile extends Component {
}

componentDidUpdate(prevProps, prevState){
if (prevProps.match.params.uid != this.props.match.params.uid){
if (prevProps.match.params.uid !== this.props.match.params.uid){
this.setState({uid: this.props.match.params.uid})

getUser(this, ()=>{
Expand Down Expand Up @@ -307,8 +307,8 @@ class ViewProfile extends Component {
<Tabs value={this.state.currTab} onChange={this.handleTab} variant="fullWidth" classes={{
indicator: classes.indicator,
flexContainer: classes.flexContainer}}>
<Tab label={app.state.currentUser._id == this.state.uid ? "My Recipe" : `${this.state.user.username}'s Recipe`} className={classes.tab}/>
<Tab label={app.state.currentUser._id == this.state.uid ? "My Collection" : `${this.state.user.username}'s Collection`} className={classes.tab}/>
<Tab label={app.state.currentUser._id === this.state.uid ? "My Recipe" : `${this.state.user.username}'s Recipe`} className={classes.tab}/>
<Tab label={app.state.currentUser._id === this.state.uid ? "My Collection" : `${this.state.user.username}'s Collection`} className={classes.tab}/>
</Tabs>
</AppBar>
<this.TabPanel className={classes.panel} value={this.state.currTab} index={0}>
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/viewRecipe/viewRecipe.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@

.view-recipe-form-group{
margin-top: 10px;
float: left;
/* float: left; */
margin-right: 10px;
margin-left: 10px;
margin-bottom: 10px;
}

Expand Down

0 comments on commit 9f5f583

Please sign in to comment.