import PostList from "@web/src/components/models/course/list/PostList";
import { useMainContext } from "../../layout/MainProvider";
import { PostType, Prisma } from "@nice/common";
import PostCard from "@web/src/components/models/post/PostCard";
import PathCard from "@web/src/components/models/post/SubPost/PathCard";

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