Skip to content

Commit

Permalink
docs(examples): use react instantsearch hooks widgets from library (#972
Browse files Browse the repository at this point in the history
)
  • Loading branch information
dhayab authored May 18, 2022
1 parent 862c24b commit aa6c7f0
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 377 deletions.
2 changes: 1 addition & 1 deletion examples/react-instantsearch-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"algoliasearch": "4.12.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-instantsearch-hooks": "6.22.0"
"react-instantsearch-hooks-web": "6.25.0"
},
"devDependencies": {
"@types/react": "17.0.33",
Expand Down
10 changes: 8 additions & 2 deletions examples/react-instantsearch-hooks/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import algoliasearch from 'algoliasearch/lite';
import { Configure, InstantSearch } from 'react-instantsearch-hooks';
import {
Configure,
HierarchicalMenu,
Hits,
InstantSearch,
Pagination,
} from 'react-instantsearch-hooks-web';

import { Autocomplete, Hit } from './components';
import {
INSTANT_SEARCH_HIERARCHICAL_ATTRIBUTES,
INSTANT_SEARCH_INDEX_NAME,
} from './constants';
import { HierarchicalMenu, Hits, Pagination, Panel } from './widgets';
import { Panel } from './widgets/Panel';

import './App.css';

Expand Down
4 changes: 2 additions & 2 deletions examples/react-instantsearch-hooks/src/components/Hit.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Hit as AlgoliaHit } from '@algolia/client-search';
import type { Hit as AlgoliaHit } from 'instantsearch.js/es/types';

import { Snippet } from './Snippet';
import { Snippet } from 'react-instantsearch-hooks-web';

type HitProps = {
hit: AlgoliaHit<{
Expand Down
95 changes: 0 additions & 95 deletions examples/react-instantsearch-hooks/src/components/Snippet.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions examples/react-instantsearch-hooks/src/utils/cx.ts

This file was deleted.

2 changes: 0 additions & 2 deletions examples/react-instantsearch-hooks/src/utils/index.ts

This file was deleted.

10 changes: 0 additions & 10 deletions examples/react-instantsearch-hooks/src/utils/isModifierClick.ts

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions examples/react-instantsearch-hooks/src/widgets/Hits.tsx

This file was deleted.

Loading

0 comments on commit aa6c7f0

Please sign in to comment.