training_data/apps/web/src/app/main/my-duty/page.tsx

25 lines
591 B
TypeScript
Raw Normal View History

2025-02-27 08:03:31 +08:00
import PostList from "@web/src/components/models/course/list/PostList";
2025-02-26 21:08:38 +08:00
import { useAuth } from "@web/src/providers/auth-provider";
2025-02-27 08:03:31 +08:00
import CourseCard from "../courses/components/CourseCard";
2025-02-27 12:28:03 +08:00
import PostCard from "@web/src/components/models/course/card/PostCard";
2025-02-26 19:49:50 +08:00
2025-02-26 21:08:38 +08:00
export default function MyDutyPage() {
const { user } = useAuth();
return (
<>
<div className="p-4">
2025-02-27 08:03:31 +08:00
<PostList
2025-02-27 12:28:03 +08:00
renderItem={post=><PostCard course={post}></PostCard>}
2025-02-27 08:03:31 +08:00
2025-02-26 21:08:38 +08:00
params={{
pageSize: 12,
where: {
authorId: user.id,
},
}}
2025-02-27 08:03:31 +08:00
cols={4}></PostList>
2025-02-26 21:08:38 +08:00
</div>
</>
);
2025-02-26 19:49:50 +08:00
}