acc9c84e2e
* Configure functions module to allow absolute imports * Convert common imports in functions to be absolute * Convert common imports in web to be absolute * Convert lib imports in web to be absolute * Convert hooks imports in web to be absolute * Convert components imports in web to be absolute
15 lines
384 B
TypeScript
15 lines
384 B
TypeScript
import { DateTimeTooltip } from './datetime-tooltip'
|
|
import { fromNow } from 'web/lib/util/time'
|
|
import React from 'react'
|
|
|
|
export function RelativeTimestamp(props: { time: number }) {
|
|
const { time } = props
|
|
return (
|
|
<DateTimeTooltip time={time}>
|
|
<span className="ml-1 whitespace-nowrap text-gray-400">
|
|
{fromNow(time)}
|
|
</span>
|
|
</DateTimeTooltip>
|
|
)
|
|
}
|