26 lines
665 B
TypeScript
Executable File
26 lines
665 B
TypeScript
Executable File
import { useMainContext } from "../../layout/MainProvider";
|
|
import { PostType, Prisma } from "@nice/common";
|
|
import PostList from "@web/src/components/models/course/list/PostList";
|
|
import CourseCard from "@web/src/components/models/post/SubPost/CourseCard";
|
|
|
|
export function CoursesContainer() {
|
|
const { searchCondition, termsCondition } = useMainContext();
|
|
return (
|
|
<>
|
|
<PostList
|
|
renderItem={(post) => <CourseCard post={post}></CourseCard>}
|
|
params={{
|
|
pageSize: 12,
|
|
where: {
|
|
type: PostType.COURSE,
|
|
...termsCondition,
|
|
...searchCondition,
|
|
},
|
|
}}
|
|
cols={4}></PostList>
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default CoursesContainer;
|