14 lines
359 B
TypeScript
14 lines
359 B
TypeScript
![]() |
import { CourseDto, PostDto } from "@nice/common";
|
||
|
import { useNavigate } from "react-router-dom";
|
||
|
import PostCard from "../PostCard";
|
||
|
export default function CourseCard({ post }: { post: PostDto }) {
|
||
|
const navigate = useNavigate();
|
||
|
return (
|
||
|
<PostCard
|
||
|
post={post}
|
||
|
onClick={() => {
|
||
|
navigate(`/course/${post?.id}/detail`);
|
||
|
}}></PostCard>
|
||
|
);
|
||
|
}
|