From d7cdcf082fab6c0cb7c2fe4bed821bd1a8000e69 Mon Sep 17 00:00:00 2001
From: Christopher Speller <crspeller@gmail.com>
Date: Mon, 8 Feb 2016 07:26:10 -0500
Subject: Convering client to react-router.

---
 .../components/user_settings/user_settings_general.jsx    | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

(limited to 'web/react/components/user_settings/user_settings_general.jsx')

diff --git a/web/react/components/user_settings/user_settings_general.jsx b/web/react/components/user_settings/user_settings_general.jsx
index b0b1c414e..235892819 100644
--- a/web/react/components/user_settings/user_settings_general.jsx
+++ b/web/react/components/user_settings/user_settings_general.jsx
@@ -13,7 +13,7 @@ import Constants from '../../utils/constants.jsx';
 import * as AsyncClient from '../../utils/async_client.jsx';
 import * as Utils from '../../utils/utils.jsx';
 
-import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'mm-intl';
+import {intlShape, injectIntl, defineMessages, FormattedMessage, FormattedDate} from 'mm-intl';
 
 const holders = defineMessages({
     usernameReserved: {
@@ -712,7 +712,7 @@ class UserSettingsGeneralTab extends React.Component {
                 <SettingPicture
                     title={formatMessage(holders.profilePicture)}
                     submit={this.submitPicture}
-                    src={'/api/v1/users/' + user.id + '/image?time=' + user.last_picture_update + '&' + Utils.getSessionIndex()}
+                    src={'/api/v1/users/' + user.id + '/image?time=' + user.last_picture_update}
                     server_error={serverError}
                     client_error={clientError}
                     updateSection={(e) => {
@@ -729,7 +729,14 @@ class UserSettingsGeneralTab extends React.Component {
             let minMessage = formatMessage(holders.uploadImage);
             if (user.last_picture_update) {
                 minMessage = formatMessage(holders.imageUpdated, {
-                    date: new Date(user.last_picture_update).toLocaleDateString(global.window.mm_locale, {month: 'short', day: '2-digit', year: 'numeric'})
+                    date: (
+                        <FormattedDate
+                            value={new Date(user.last_picture_update)}
+                            day='2-digit'
+                            month='short'
+                            year='numeric'
+                        />
+                    )
                 });
             }
             pictureSection = (
@@ -805,4 +812,4 @@ UserSettingsGeneralTab.propTypes = {
     collapseModal: React.PropTypes.func.isRequired
 };
 
-export default injectIntl(UserSettingsGeneralTab);
\ No newline at end of file
+export default injectIntl(UserSettingsGeneralTab);
-- 
cgit v1.2.3-1-g7c22

