import PostList from "@web/src/components/models/course/list/PostList";
import { useAuth } from "@web/src/providers/auth-provider";
import { useMainContext } from "../../layout/MainProvider";
import { PostType } from "@nice/common";
import PathCard from "@web/src/components/models/post/SubPost/PathCard";

export default function MyDutyPathContainer() {
	const { user } = useAuth();
	const { searchCondition, termsCondition } = useMainContext();
	return (
		<>
			<PostList
				renderItem={(post) => <PathCard post={post}></PathCard>}
				params={{
					pageSize: 12,
					where: {
						type: PostType.PATH,
						authorId: user?.id,
						...termsCondition,
						...searchCondition,
					},
				}}
				cols={4}></PostList>
		</>
	);
}
