import { PlusIcon } from "@heroicons/react/24/outline"; import { CourseList } from "@web/src/components/models/course/list/course-list"; import { Button } from "@web/src/components/presentation/element/Button"; import { api } from "@nicestack/client"; import { useState } from "react"; import { CourseCard } from "@web/src/components/models/course/card/CourseCard"; import { useNavigate } from "react-router-dom"; import { useAuth } from "@web/src/providers/auth-provider"; export default function InstructorCoursesPage() { const navigate = useNavigate() const [currentPage, setCurrentPage] = useState(1); const { user } = useAuth() const { data: paginationRes, refetch } = api.course.findManyWithPagination.useQuery({ page: currentPage, pageSize: 8, where: { instructors: { some: { instructorId: user?.id } } } }); const handlePageChange = (page: number) => { setCurrentPage(page); refetch() }; return (

我教授的课程

} />
); }