This commit is contained in:
cupcakearmy
2019-05-22 20:34:58 +02:00
parent 7b81984ce7
commit dcbc4bcdd7
73 changed files with 4138 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import React from 'react'
import { Duration } from 'uhrwerk'
export const timePassedSinceTimestamp = since => new Duration(Date.now() - since, 'milliseconds').humanize() + ' ago'
export const formatPrice = price => {
const [int, float] = price.toFixed(2).split('.')
return <span className={'mr-1'}>
<b>{int}
<small>,{float}</small>
</b>
</span>
}