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:25:41 +08:00
|
|
|
import { useMainContext } from "../layout/MainProvider";
|
2025-02-27 08:03:31 +08:00
|
|
|
import CourseCard from "../courses/components/CourseCard";
|
2025-02-26 19:49:50 +08:00
|
|
|
|
2025-02-26 21:08:38 +08:00
|
|
|
export default function MyDutyPage() {
|
|
|
|
const { user } = useAuth();
|
2025-02-27 08:25:41 +08:00
|
|
|
const { searchCondition } = useMainContext();
|
2025-02-26 21:08:38 +08:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<div className="p-4">
|
2025-02-27 08:03:31 +08:00
|
|
|
<PostList
|
2025-02-27 08:27:46 +08:00
|
|
|
renderItem={(post) => (
|
|
|
|
<CourseCard edit course={post}></CourseCard>
|
|
|
|
)}
|
2025-02-26 21:08:38 +08:00
|
|
|
params={{
|
|
|
|
pageSize: 12,
|
|
|
|
where: {
|
|
|
|
authorId: user.id,
|
2025-02-27 08:25:41 +08:00
|
|
|
...searchCondition,
|
2025-02-26 21:08:38 +08:00
|
|
|
},
|
|
|
|
}}
|
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
|
|
|
}
|