From 5a4945c4d5c06b96b4f6d5cb38bcef6f949dff16 Mon Sep 17 00:00:00 2001
From: Elias Nahum <nahumhbl@gmail.com>
Date: Fri, 18 Mar 2016 12:12:35 -0300
Subject: PLT-2368: Fix for Date of last profile picture update is showing
 [object][object]

---
 .../user_settings/user_settings_general.jsx        | 30 ++++++++++++----------
 1 file changed, 16 insertions(+), 14 deletions(-)

(limited to 'webapp/components/user_settings/user_settings_general.jsx')

diff --git a/webapp/components/user_settings/user_settings_general.jsx b/webapp/components/user_settings/user_settings_general.jsx
index 42c7e1a77..2129847aa 100644
--- a/webapp/components/user_settings/user_settings_general.jsx
+++ b/webapp/components/user_settings/user_settings_general.jsx
@@ -60,10 +60,6 @@ const holders = defineMessages({
         id: 'user.settings.general.uploadImage',
         defaultMessage: "Click 'Edit' to upload an image."
     },
-    imageUpdated: {
-        id: 'user.settings.general.imageUpdated',
-        defaultMessage: 'Image last updated {date}'
-    },
     fullName: {
         id: 'user.settings.general.fullName',
         defaultMessage: 'Full Name'
@@ -730,16 +726,22 @@ class UserSettingsGeneralTab extends React.Component {
         } else {
             let minMessage = formatMessage(holders.uploadImage);
             if (user.last_picture_update) {
-                minMessage = formatMessage(holders.imageUpdated, {
-                    date: (
-                        <FormattedDate
-                            value={new Date(user.last_picture_update)}
-                            day='2-digit'
-                            month='short'
-                            year='numeric'
-                        />
-                    )
-                });
+                minMessage = (
+                    <FormattedMessage
+                        id='user.settings.general.imageUpdated'
+                        defaultMessage='Image last updated {date}'
+                        values={{
+                            date: (
+                                <FormattedDate
+                                    value={new Date(user.last_picture_update)}
+                                    day='2-digit'
+                                    month='short'
+                                    year='numeric'
+                                />
+                            )
+                        }}
+                    />
+                );
             }
             pictureSection = (
                 <SettingItemMin
-- 
cgit v1.2.3-1-g7c22

