@@ -5,17 +5,13 @@ import { useEffect, useState } from "react";
55import axios , { type AxiosError } from "axios" ;
66import { Button } from "@/components/ui/button" ;
77import { type IPaper , type Filters } from "@/interface" ;
8- import { FilterDialog } from "@/components/FilterDialog" ;
98import Card from "./Card" ;
109import { extractBracketContent } from "@/util/utils" ;
1110import { useRouter } from "next/navigation" ;
12- import SearchBarChild from "./Searchbar/searchbar-child" ;
1311import Loader from "./ui/loader" ;
14- import { campuses , semesters } from "./select_options" ;
15- import SearchBar from "./Searchbar/searchbar" ;
12+
1613import filterIcon from "../assets/filterIcon.svg" ;
1714import Image from "next/image" ;
18- import { XIcon } from "lucide-react" ;
1915import SideBar from "../components/SideBar" ;
2016
2117const CatalogueContent = ( ) => {
@@ -25,18 +21,7 @@ const CatalogueContent = () => {
2521 const exams = searchParams . get ( "exams" ) ?. split ( "," ) ;
2622 const slots = searchParams . get ( "slots" ) ?. split ( "," ) ;
2723 const years = searchParams . get ( "years" ) ?. split ( "," ) ;
28- const semesters = searchParams . get ( "semesters" ) ?. split ( "," ) ;
29- const campuses = searchParams . get ( "campuses" ) ?. split ( "," ) ;
3024
31- const [ selectedExams , setSelectedExams ] = useState < string [ ] | undefined > (
32- exams ,
33- ) ;
34- const [ selectedSlots , setSelectedSlots ] = useState < string [ ] | undefined > (
35- slots ,
36- ) ;
37- const [ selectedYears , setSelectedYears ] = useState < string [ ] | undefined > (
38- years ,
39- ) ;
4025
4126 // const handleResetFilters = () => {
4227 // setSelectedExams([]);
@@ -170,7 +155,7 @@ const CatalogueContent = () => {
170155
171156 void fetchPapers ( ) ;
172157 }
173- } , [ subject , exams ?. join ( "," ) , slots ?. join ( "," ) , years ?. join ( "," ) ] ) ; //changed because userRouter() changes everytime
158+ } , [ exams , slots , subject , years ] ) ; //changed because userRouter() changes everytime
174159 return (
175160 < div className = "relative flex min-h-screen p-0" >
176161 < SideBar
0 commit comments