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 = () => {
111
111
setLoading ( true ) ;
112
112
113
113
try {
114
- const papersResponse = await axios . get < { papers : Paper [ ] , filters : Filters } > ( "/api/papers" , {
114
+ const papersResponse = await axios . get < Filters > ( "/api/papers" , {
115
115
params : { subject } ,
116
116
} ) ;
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 ;
119
120
120
121
setFilterOptions ( filters ) ;
121
122
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ function SearchBar() {
85
85
value = { searchText }
86
86
onChange = { handleSearchChange }
87
87
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" : "" } ` }
89
89
/>
90
90
< button
91
91
type = "submit"
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ export interface Paper {
118
118
}
119
119
120
120
export interface Filters {
121
- paper : Paper ;
121
+ papers : Paper [ ] ;
122
122
uniqueExams : string [ ] ;
123
123
uniqueSlots : string [ ] ;
124
124
uniqueYears : string [ ] ;
You can’t perform that action at this time.
0 commit comments