From f1257f98a4953cc2799f07e27f57230e109f4769 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 8 Feb 2020 10:09:58 +0100 Subject: [PATCH] Client - refactor user profile (wip) --- .../src/components/User/Profile.jsx | 135 +---------------- .../src/components/User/ProfileDetail.jsx | 141 ++++++++++++++++++ 2 files changed, 147 insertions(+), 129 deletions(-) create mode 100644 fittrackee_client/src/components/User/ProfileDetail.jsx diff --git a/fittrackee_client/src/components/User/Profile.jsx b/fittrackee_client/src/components/User/Profile.jsx index c41914e3..a642d982 100644 --- a/fittrackee_client/src/components/User/Profile.jsx +++ b/fittrackee_client/src/components/User/Profile.jsx @@ -1,142 +1,19 @@ -import { format } from 'date-fns' import React from 'react' -import { Helmet } from 'react-helmet' import { withTranslation } from 'react-i18next' import { connect } from 'react-redux' -import { Link } from 'react-router-dom' -import Message from '../Common/Message' -import { deletePicture, uploadPicture } from '../../actions/user' -import { apiUrl, getFileSize } from '../../utils' +import ProfileDetail from './ProfileDetail' -function Profile({ - appConfig, - message, - onDeletePicture, - onUploadPicture, - t, - user, -}) { - const createdAt = user.created_at - ? format(new Date(user.created_at), 'dd/MM/yyyy HH:mm') - : '' - const birthDate = user.birth_date - ? format(new Date(user.birth_date), 'dd/MM/yyyy') - : '' - const fileSizeLimit = getFileSize(appConfig.max_single_file_size) +function Profile({ t, user }) { return (
- - FitTrackee - {t('user:Profile')} - - -
-

{t('user:Profile')}

-
-
-
-
- {user.username}{' '} - -