import { track } from '@amplitude/analytics-browser' import { DocumentIcon } from '@heroicons/react/solid' import clsx from 'clsx' import { Post } from 'common/post' import Link from 'next/link' import { useUserById } from 'web/hooks/use-user' import { postPath } from 'web/lib/firebase/posts' import { fromNow } from 'web/lib/util/time' import { Avatar } from './avatar' import { CardHighlightOptions } from './contract/contracts-grid' import { Row } from './layout/row' import { UserLink } from './user-link' export function PostCard(props: { post: Post onPostClick?: (post: Post) => void highlightOptions?: CardHighlightOptions }) { const { post, onPostClick, highlightOptions } = props const creatorId = post.creatorId const user = useUserById(creatorId) const { itemIds: itemIds, highlightClassName } = highlightOptions || {} if (!user) return <> > return (