From c5600050474d92e027f92116a7ea5f3cce755509 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 2 Nov 2018 14:33:40 +0100 Subject: [PATCH] fix #18 --- client/src/components/ProfileSheet.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/client/src/components/ProfileSheet.js b/client/src/components/ProfileSheet.js index d2775451c..b603fa224 100644 --- a/client/src/components/ProfileSheet.js +++ b/client/src/components/ProfileSheet.js @@ -85,7 +85,8 @@ class ProfileSheet extends Component { firstNameError: false, middleNameError: false, lastNameError: false, - bioError: false + bioError: false, + updated: false } } @@ -134,6 +135,8 @@ class ProfileSheet extends Component { user.role.id = this.state.roleId localStorage.setItem('loggedInUser', JSON.stringify(user)) + + this.setState({updated: true}) } handleCheckBoxes (e) { @@ -301,6 +304,14 @@ class ProfileSheet extends Component { } } + displayButtonTitle () { + if (this.state.updated === true) { + return 'Updated' + } else { + return 'Update' + } + } + render () { const { classes } = this.props return ( @@ -481,7 +492,13 @@ class ProfileSheet extends Component { - +