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