This commit is contained in:
ditiqi 2025-02-25 16:43:42 +08:00
parent c2a5a13063
commit 237d5a44d8
2 changed files with 8 additions and 6 deletions

View File

@ -6,7 +6,12 @@ import {
TeamOutlined,
ArrowRightOutlined,
} from "@ant-design/icons";
import { CourseDto, TaxonomySlug, TermDto } from "@nice/common";
import {
courseDetailSelect,
CourseDto,
TaxonomySlug,
TermDto,
} from "@nice/common";
import { api } from "@nice/client";
import CourseCard from "../../courses/components/CourseCard";
interface GetTaxonomyProps {
@ -50,10 +55,7 @@ function useFetchCoursesByCategory(category: string) {
},
},
take: 8,
include: {
terms: true,
depts: true,
},
select: courseDetailSelect,
});
return { data, isLoading };

View File

@ -77,7 +77,7 @@ export type Course = Post & {
export type CourseDto = Course & {
enrollments?: Enrollment[];
sections?: SectionDto[];
terms: Term[];
terms: TermDto[];
lectureCount?: number;
depts:Department[]
};