2025-02-27 13:32:33 +08:00
|
|
|
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}`);
|
2025-02-27 19:17:23 +08:00
|
|
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
2025-02-27 13:32:33 +08:00
|
|
|
}}></PostCard>
|
|
|
|
);
|
|
|
|
}
|