File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -111,11 +111,12 @@ const CatalogueContent = () => {
111111 setLoading ( true ) ;
112112
113113 try {
114- const papersResponse = await axios . get < { papers : Paper [ ] , filters : Filters } > ( "/api/papers" , {
114+ const papersResponse = await axios . get < Filters > ( "/api/papers" , {
115115 params : { subject } ,
116116 } ) ;
117- const papersData : Paper [ ] = papersResponse . data . papers ;
118- const filters : Filters = papersResponse . data . filters ;
117+ const Data : Filters = papersResponse . data ;
118+ const papersData = Data . papers ;
119+ const filters : Filters = papersResponse . data ;
119120
120121 setFilterOptions ( filters ) ;
121122
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ function SearchBar() {
8585 value = { searchText }
8686 onChange = { handleSearchChange }
8787 placeholder = "Search by subject..."
88- className = { `w-full font-sans text-md font-semibold tracking-wider rounded-full border bg-[#434dba] px-4 py-6 pr-10 text-white shadow-sm placeholder:text-white focus:outline-none focus:ring-2 ${ loading ? "opacity-70" : "" } ` }
88+ className = { `w-full font-sans text-md tracking-wider rounded-full border bg-[#434dba] px-4 py-6 pr-10 text-white shadow-sm placeholder:text-white focus:outline-none focus:ring-2 ${ loading ? "opacity-70" : "" } ` }
8989 />
9090 < button
9191 type = "submit"
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ export interface Paper {
118118}
119119
120120export interface Filters {
121- paper : Paper ;
121+ papers : Paper [ ] ;
122122 uniqueExams : string [ ] ;
123123 uniqueSlots : string [ ] ;
124124 uniqueYears : string [ ] ;
You can’t perform that action at this time.
0 commit comments