UNPKG

sanity

Version:

Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches

19 lines (16 loc) 415 B
import {useRelativeTime} from './useRelativeTime' /** @internal */ export interface TimeAgoOpts { minimal?: boolean agoSuffix?: boolean } /** * @deprecated - Use {@link useRelativeTime} instead * @internal */ export function useTimeAgo(time: Date | string, options: TimeAgoOpts = {}): string { return useRelativeTime(time, { minimal: options.minimal, useTemporalPhrase: options.agoSuffix, }) }