The best way to control Claude Code, Codex and more from any computer or phone

main
tsx 8 lines 352 Bytes
Raw
1 import { useRelativeTimeState } from "../hooks/useRelativeTimeState";
2
3 // Use a live clock because the compiler caches inline formatting on the timestamp.
4 export function RelativeTime(props: { timestamp: string }) {
5 const relative = useRelativeTimeState(props.timestamp);
6 if (relative.status !== "relative") return null;
7 return relative.label;
8 }