addd
This commit is contained in:
parent
c2a5a13063
commit
237d5a44d8
|
@ -6,7 +6,12 @@ import {
|
||||||
TeamOutlined,
|
TeamOutlined,
|
||||||
ArrowRightOutlined,
|
ArrowRightOutlined,
|
||||||
} from "@ant-design/icons";
|
} 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 { api } from "@nice/client";
|
||||||
import CourseCard from "../../courses/components/CourseCard";
|
import CourseCard from "../../courses/components/CourseCard";
|
||||||
interface GetTaxonomyProps {
|
interface GetTaxonomyProps {
|
||||||
|
@ -50,10 +55,7 @@ function useFetchCoursesByCategory(category: string) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
take: 8,
|
take: 8,
|
||||||
include: {
|
select: courseDetailSelect,
|
||||||
terms: true,
|
|
||||||
depts: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return { data, isLoading };
|
return { data, isLoading };
|
||||||
|
|
|
@ -77,7 +77,7 @@ export type Course = Post & {
|
||||||
export type CourseDto = Course & {
|
export type CourseDto = Course & {
|
||||||
enrollments?: Enrollment[];
|
enrollments?: Enrollment[];
|
||||||
sections?: SectionDto[];
|
sections?: SectionDto[];
|
||||||
terms: Term[];
|
terms: TermDto[];
|
||||||
lectureCount?: number;
|
lectureCount?: number;
|
||||||
depts:Department[]
|
depts:Department[]
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue