File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ const Badges: FC = () => {
5252 const { data, isLoading, mutate } = useQueryBadges ( {
5353 page : curPage ,
5454 page_size : PAGE_SIZE ,
55- q : curQuery ,
55+ ... ( curQuery ? { q : curQuery } : { } ) ,
5656 ...( curFilter === 'all' ? { } : { status : curFilter } ) ,
5757 } ) ;
5858
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import request from '@/utils/request';
2424import type * as Type from '@/common/interface' ;
2525
2626export const useQueryBadges = ( params ) => {
27- const apiUrl = `/answer/admin/api/badges?${ qs . stringify ( params ) } ` ;
27+ const apiUrl = `/answer/admin/api/badges?${ qs . stringify ( params , { skipNulls : true } ) } ` ;
2828 const { data, error, mutate } = useSWR <
2929 Type . ListResult < Type . AdminBadgeListItem > ,
3030 Error
You can’t perform that action at this time.
0 commit comments