import { PostDto } from "@nice/common";
import { useNavigate } from "react-router-dom";
import PostCard from "../PostCard";

export default function PathCard({ post }: { post: PostDto }) {
	const navigate = useNavigate();
	return (
		<PostCard
			post={post}
			onClick={() => {
				navigate(`/path/editor/${post?.id}`);
				window.scrollTo({ top: 0, behavior: "smooth" });
			}}></PostCard>
	);
}
