File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ interface UseFetchScorecardsParams {
1010 perPage : number
1111 name ?: string
1212 challengeTrack ?: string
13- type ?: string
13+ scorecardType ?: string
1414 challengeType ?: string
1515 status ?: string
1616}
@@ -33,15 +33,15 @@ export function useFetchScorecards(
3333 name = '' ,
3434 challengeTrack = '' ,
3535 challengeType = '' ,
36+ scorecardType = '' ,
3637 status = '' ,
37- type = '' ,
3838 } : UseFetchScorecardsParams ,
3939) : ScorecardsResponse {
4040 const query = new URLSearchParams ( {
4141 page : String ( page ) ,
4242 perPage : String ( perPage ) ,
4343 ...( name ? { name } : { } ) ,
44- ...( type ? { type } : { } ) ,
44+ ...( scorecardType ? { scorecardType } : { } ) ,
4545 ...( challengeTrack ? { challengeTrack } : { } ) ,
4646 ...( challengeType ? { challengeType } : { } ) ,
4747 ...( status ? { status } : { } ) ,
Original file line number Diff line number Diff line change @@ -30,16 +30,17 @@ export const ScorecardsListPage: FC<{}> = () => {
3030 isValidating : isLoadingScorecards ,
3131 } : ScorecardsResponse = useFetchScorecards ( {
3232 challengeTrack : filters . projectType ,
33+ challengeType : filters . category ,
3334 name : filters . name ,
3435 page,
3536 perPage,
37+ scorecardType : filters . type ,
3638 status : filters . status ,
37- type : filters . type ,
3839 } )
3940
4041 const handleFiltersChange = useCallback ( ( newFilters : typeof filters ) => {
4142 setFilters ( newFilters )
42- setPage ( 1 ) // Optional: reset page on filter change
43+ setPage ( 1 )
4344 } , [ ] )
4445
4546 return (
You can’t perform that action at this time.
0 commit comments