import { format } from 'date-fns'; import { AuditLog } from '@prisma/client'; import { generateLogMessage } from '@/lib/generate-log-message'; import { Avatar, AvatarImage } from '@/components/ui/avatar'; interface ActivityItemProps { data: AuditLog; } export const ActivityItem = ({ data }: ActivityItemProps) => { return (
  • {data.userName} {' '} {generateLogMessage(data)}

    {format(new Date(data.createdAt), "MMM d, yyyy 'at' h:mm a")}

  • ); };