nicer dates in timeline header

This commit is contained in:
Lachlan Kermode
2020-07-01 11:10:18 +02:00
parent e985857d73
commit 109210714f
4 changed files with 23 additions and 17 deletions

View File

@@ -1,8 +1,9 @@
import React from 'react'
import { makeNiceDate } from '../../../common/utilities'
const TimelineHeader = ({ title, from, to, onClick, hideInfo }) => {
const d0 = from && from.toLocaleDateString()
const d1 = to && to.toLocaleDateString()
const d0 = from && makeNiceDate(from)
const d1 = to && makeNiceDate(to)
return (
<div className='timeline-header'>
<div className='timeline-toggle' onClick={() => onClick()}>