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' 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) return (
{t('user:Email')}: {user.email}
{t('user:Registration Date')}: {createdAt}
{t('user:First Name')}: {user.first_name}
{t('user:Last Name')}: {user.last_name}
{t('user:Birth Date')}: {birthDate}
{t('user:Location')}: {user.location}
{t('user:Bio')}: {user.bio}
{t('user:Language')}: {user.language}
{t('user:Timezone')}: {user.timezone}
{t('user:First day of week')}:{' '} {user.weekm ? t('user:Monday') : t('user:Sunday')}