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 {
10
10
perPage : number
11
11
name ?: string
12
12
challengeTrack ?: string
13
- type ?: string
13
+ scorecardType ?: string
14
14
challengeType ?: string
15
15
status ?: string
16
16
}
@@ -33,15 +33,15 @@ export function useFetchScorecards(
33
33
name = '' ,
34
34
challengeTrack = '' ,
35
35
challengeType = '' ,
36
+ scorecardType = '' ,
36
37
status = '' ,
37
- type = '' ,
38
38
} : UseFetchScorecardsParams ,
39
39
) : ScorecardsResponse {
40
40
const query = new URLSearchParams ( {
41
41
page : String ( page ) ,
42
42
perPage : String ( perPage ) ,
43
43
...( name ? { name } : { } ) ,
44
- ...( type ? { type } : { } ) ,
44
+ ...( scorecardType ? { scorecardType } : { } ) ,
45
45
...( challengeTrack ? { challengeTrack } : { } ) ,
46
46
...( challengeType ? { challengeType } : { } ) ,
47
47
...( status ? { status } : { } ) ,
Original file line number Diff line number Diff line change @@ -30,16 +30,17 @@ export const ScorecardsListPage: FC<{}> = () => {
30
30
isValidating : isLoadingScorecards ,
31
31
} : ScorecardsResponse = useFetchScorecards ( {
32
32
challengeTrack : filters . projectType ,
33
+ challengeType : filters . category ,
33
34
name : filters . name ,
34
35
page,
35
36
perPage,
37
+ scorecardType : filters . type ,
36
38
status : filters . status ,
37
- type : filters . type ,
38
39
} )
39
40
40
41
const handleFiltersChange = useCallback ( ( newFilters : typeof filters ) => {
41
42
setFilters ( newFilters )
42
- setPage ( 1 ) // Optional: reset page on filter change
43
+ setPage ( 1 )
43
44
} , [ ] )
44
45
45
46
return (
You can’t perform that action at this time.
0 commit comments