File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export function packumentToSearchResult(
4242export interface NpmSearchOptions {
4343 /** Number of results to fetch */
4444 size ?: number
45- onSuccess ?: ( result : { query : string } ) => void
45+ onResponse ?: ( result : { query : string } ) => void
4646}
4747
4848export const emptySearchResponse = {
@@ -100,7 +100,7 @@ export function useNpmSearch(
100100 size : opts . size ?? 25 ,
101101 } )
102102
103- opts . onSuccess ?.( { query : q } )
103+ opts . onResponse ?.( { query : q } )
104104
105105 if ( q !== toValue ( query ) ) {
106106 return emptySearchResponse
@@ -133,7 +133,7 @@ export function useNpmSearch(
133133 } ) ,
134134 ] )
135135
136- opts . onSuccess ?.( { query : q } )
136+ opts . onResponse ?.( { query : q } )
137137
138138 if ( ! pkg ) {
139139 return emptySearchResponse
@@ -170,7 +170,7 @@ export function useNpmSearch(
170170 60 ,
171171 )
172172
173- opts . onSuccess ?.( { query : q } )
173+ opts . onResponse ?.( { query : q } )
174174
175175 // If query changed/outdated, return empty search response
176176 if ( q !== toValue ( query ) ) {
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ const {
193193 isRateLimited,
194194} = useNpmSearch (query , () => ({
195195 size: requestedSize .value ,
196- onSuccess : data => {
196+ onResponse : data => {
197197 router .replace ({
198198 name: ' search' ,
199199 query: { ... route .query , q: data .query },
You can’t perform that action at this time.
0 commit comments