origin/apps/web/src/components/models/post/SubPost/PathCard.tsx

16 lines
398 B
TypeScript

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>
);
}