Skip to content

Commit 32678dd

Browse files
docs(examples): simplify InstantSearch router usage
1 parent 2c31c4e commit 32678dd

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

examples/instantsearch/src/instantsearch.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,7 @@ export function getInstantSearchCurrentCategory() {
182182

183183
// Build URLs that InstantSearch understands.
184184
export function getInstantSearchUrl(indexUiState) {
185-
return `${instantSearchRouter
186-
.createURL({
187-
[INSTANT_SEARCH_INDEX_NAME]: indexUiState,
188-
})
189-
.replace(window.location.origin + window.location.pathname, '')}`;
185+
return search.createURL({ [INSTANT_SEARCH_INDEX_NAME]: indexUiState });
190186
}
191187

192188
// Return the InstantSearch index UI state.

0 commit comments

Comments
 (0)