import type { SerializeFrom } from "@remix-run/node"; import { Link } from "@remix-run/react"; import { useFormattedDate } from "~/hooks"; import type { Post } from "~/utils/posts.server"; export function PostPreview({ title, description, filename, published, }: SerializeFrom) { const formattedDate = useFormattedDate(published); return (
{title}
{description}
); }