Client - fix date error
This commit is contained in:
parent
8000018cf4
commit
b72f4e8313
@ -27,9 +27,7 @@ export default function ActivityCard(props) {
|
||||
<div className="col">
|
||||
<img
|
||||
alt="Map"
|
||||
src={
|
||||
`${apiUrl}activities/map/${activity.map}?${Date.now()}`
|
||||
}
|
||||
src={`${apiUrl}activities/map/${activity.map}?${Date.now()}`}
|
||||
className="img-fluid"
|
||||
/>
|
||||
<div className="map-attribution text-right">
|
||||
|
@ -8,6 +8,12 @@ import { deletePicture, uploadPicture } from '../../actions/user'
|
||||
import { apiUrl } from '../../utils'
|
||||
|
||||
function Profile({ message, onDeletePicture, onUploadPicture, 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')
|
||||
: ''
|
||||
return (
|
||||
<div>
|
||||
<Helmet>
|
||||
@ -33,18 +39,10 @@ function Profile({ message, onDeletePicture, onUploadPicture, user }) {
|
||||
<div className="row">
|
||||
<div className="col-md-8">
|
||||
<p>Email: {user.email}</p>
|
||||
<p>
|
||||
Registration Date:{' '}
|
||||
{format(new Date(user.created_at), 'dd/MM/yyyy HH:mm')}
|
||||
</p>
|
||||
<p>Registration Date: {createdAt}</p>
|
||||
<p>First Name: {user.first_name}</p>
|
||||
<p>Last Name: {user.last_name}</p>
|
||||
<p>
|
||||
Birth Date:{' '}
|
||||
{user.birth_date
|
||||
? format(new Date(user.birth_date), 'dd/MM/yyyy')
|
||||
: ''}
|
||||
</p>
|
||||
<p>Birth Date: {birthDate}</p>
|
||||
<p>Location: {user.location}</p>
|
||||
<p>Bio: {user.bio}</p>
|
||||
<p>Time zone: {user.timezone}</p>
|
||||
|
Loading…
Reference in New Issue
Block a user