diff --git a/client/src/components/UserImages.js b/client/src/components/ProfileImages.js similarity index 92% rename from client/src/components/UserImages.js rename to client/src/components/ProfileImages.js index 05ad4e254..f3c769010 100644 --- a/client/src/components/UserImages.js +++ b/client/src/components/ProfileImages.js @@ -55,11 +55,11 @@ const styles = theme => ({ } }) -class UserImages extends React.Component { +class ProfileImages extends React.Component { constructor (props) { super(props) - + this.defaultValuesSet = false this.state = { @@ -86,7 +86,7 @@ class UserImages extends React.Component { }) this.setState({saveDisabled: true, removeCurrentAvatar:true}) - + /* Before we are done, we need to update the state of the local storage. */ let user = JSON.parse(localStorage.getItem('loggedInUser')) @@ -116,10 +116,10 @@ class UserImages extends React.Component { let avatarChangeDate = (new Date(user.avatarChangeDate)).valueOf() let now = (new Date()).valueOf() let timePassed = now - avatarChangeDate - let oneDay = 1000 * 60 * 60 * 24 + let oneDay = 1000 * 60 * 60 * 24 console.log("dates", avatarChangeDate, now, timePassed, oneDay) - + if (timePassed < oneDay) { this.setState({ needToWait: true @@ -139,7 +139,7 @@ console.log("dates", avatarChangeDate, now, timePassed, oneDay) }) } } - + onSuccess = (uploadResults) => { console.log('onSuccess') console.log(uploadResults) @@ -156,12 +156,12 @@ console.log("dates", avatarChangeDate, now, timePassed, oneDay) localDate.getUTCSeconds(), localDate.getUTCMilliseconds()) ) - + currentDate.toISOString() - + this.setState( { - newAvatarHandle: handle, + newAvatarHandle: handle, avatarChangeDate: currentDate, showNewAvatar: true, uploadToolDisabled: true, @@ -181,7 +181,7 @@ console.log("dates", avatarChangeDate, now, timePassed, oneDay) } showCurrentAvatar() { - + const { classes } = this.props if (this.state.removeCurrentAvatar === false) { @@ -191,7 +191,7 @@ console.log("dates", avatarChangeDate, now, timePassed, oneDay) This is your current Avatar: - + ) - + } else { return ( @@ -220,10 +220,10 @@ console.log("dates", avatarChangeDate, now, timePassed, oneDay) ) } - - + + } - + showNewAvatar() { if (this.state.showNewAvatar === true) { const { classes } = this.props @@ -249,7 +249,7 @@ console.log("dates", avatarChangeDate, now, timePassed, oneDay) showUploadTool() { const { classes } = this.props - if (this.state.needToWait === true) { + if (this.state.needToWait === true) { return (
@@ -262,13 +262,13 @@ console.log("dates", avatarChangeDate, now, timePassed, oneDay)
If you want, you can choose a new one by picking an image from your computer, camera or the web, and crop it with the following tool. - + - - @@ -319,4 +319,4 @@ console.log("dates", avatarChangeDate, now, timePassed, oneDay) export default compose( graphql(updateUserImagesMutation, {name: 'updateUserImagesMutation'}), withStyles(styles) -)(UserImages) // This technique binds more than one query to a single component. +)(ProfileImages) // This technique binds more than one query to a single component. diff --git a/client/src/components/UserTabs.js b/client/src/components/UserTabs.js index 09ddf2fc5..420e73821 100644 --- a/client/src/components/UserTabs.js +++ b/client/src/components/UserTabs.js @@ -12,7 +12,7 @@ import Typography from '@material-ui/core/Typography'; // Components import ProfileSheet from './ProfileSheet'; -import UserImages from './UserImages'; +import ProfileImages from './ProfileImages'; import YourReferrer from './YourReferrer'; function TabContainer(props) { @@ -67,7 +67,7 @@ class UserTabs extends React.Component { {value === 0 && } - {value === 1 && } + {value === 1 && } {value === 2 && }
);