mirror of
https://github.com/nicotsx/zerobyte.git
synced 2026-06-03 21:59:36 -04:00
13 lines
297 B
TypeScript
13 lines
297 B
TypeScript
import { useTimeFormat, type DateInput } from "~/client/lib/datetime";
|
|
|
|
type Props = {
|
|
date: DateInput;
|
|
className?: string;
|
|
};
|
|
|
|
export function TimeAgo({ date, className }: Props) {
|
|
const { formatTimeAgo } = useTimeFormat();
|
|
|
|
return <span className={className}>{formatTimeAgo(date)}</span>;
|
|
}
|