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.
-
+
-
-
);