import { User } from '@/api-client/ApiClient'; import { Avatar, Card, Group, Spoiler, Stack, Text } from '@mantine/core'; import { getRelativeTime } from '@/lib/utils/time'; import Link from 'next/link'; interface Props { id: string; note: string; createdAt: string; author: User; } export default function NoteCard(props: Props) { const time = getRelativeTime(props.createdAt); const relativeCreateDate = time === 'just now' ? `${time}` : `${time} ago`; return ( {props.note} {props.author.name} {' ยท '} {relativeCreateDate}{' '} ); }