Skip to content

Commit

Permalink
fix: remove search result pagination (addresses #2)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinstadler committed Sep 23, 2024
1 parent 2a2acaa commit 7d47194
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions app/search/instantsearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@
import type { StateMapping, UiState } from "instantsearch.js";
import { type MessageKeys, useTranslations } from "next-intl";
import type { ReactNode } from "react";
import {
Configure,
Hits,
Pagination,
RefinementList,
SearchBox,
SortBy,
Stats,
} from "react-instantsearch";
import { Configure, Hits, RefinementList, SearchBox, SortBy } from "react-instantsearch";
import { InstantSearchNext } from "react-instantsearch-nextjs";
import TypesenseInstantSearchAdapter, { type SearchClient } from "typesense-instantsearch-adapter";

Expand Down Expand Up @@ -86,7 +78,6 @@ const stateMapping: StateMapping<UiState, RouteState> = {
const uiState = {
[collectionName]: {
query: routeState.q,
page: routeState.page,
refinementList: {},
sortBy: routeState.sort ? `${collectionName}/sort/${routeState.sort}` : undefined,
},
Expand Down Expand Up @@ -172,17 +163,6 @@ export function InstantSearch() {
return <ClickablePublicationThumbnail publication={hit as unknown as Publication} />;
}}
/>
<div className="flex place-content-between">
<Stats />
<Pagination
classNames={{
root: "float-right",
list: "flex gap-1",
noRefinementRoot: "hidden",
selectedItem: "font-bold",
}}
/>
</div>
</div>
</InstantSearchNext>
);
Expand Down

0 comments on commit 7d47194

Please sign in to comment.