import { useState, useMemo, useEffect } from "react";
import FilterSection from "./components/FilterSection";
import CourseList from "./components/CourseList";
import { api } from "@nice/client";
import {
	courseDetailSelect,
	CourseDto,
	LectureType,
	PostType,
} from "@nice/common";
import { useSearchParams } from "react-router-dom";
import { set } from "idb-keyval";
import { useMainContext } from "../layout/MainProvider";

interface paginationData {
	items: CourseDto[];
	totalPages: number;
}
export default function CoursesPage() {
	const { searchValue, setSearchValue } = useMainContext();

	return (
		<>
			<div className="min-h-screen bg-gray-50">
				<div>{searchValue}</div>
				<CourseList
					params={{
						page: 1,
						pageSize: 12,
					}}></CourseList>
			</div>
		</>
	);
}
