import { Card, Stack, Text, Title } from '@pikku/mantine/core' import { asI18n } from '@pikku/react' import { m } from '@/i18n/messages' import { useLocale } from '@/i18n/config' type MessageCardProps = { message: string updatedAt: string updatedBy: { email: string name: string | null } | null } export function MessageCard(props: MessageCardProps) { useLocale() const updatedBy = props.updatedBy?.name || props.updatedBy?.email || m.message__read__nobody() return (
{m.message__read__eyebrow()} {m.message__read__title()} {m.message__read__description()}
{asI18n(props.message)} {m.message__read__last_updated_by({ name: updatedBy })} {asI18n(new Date(props.updatedAt).toLocaleString())}
) }