Skip to content

Commit

Permalink
feat: Convert search code sample to typescript and use the Limitless …
Browse files Browse the repository at this point in the history
…UI useSearch hook (#41)

Co-authored-by: Anand Gorantala <anand.gorantala@bloomreach.com>
  • Loading branch information
anandgorantala and Anand Gorantala authored Oct 3, 2024
1 parent fc5d4b3 commit caf8066
Show file tree
Hide file tree
Showing 12 changed files with 1,391 additions and 387 deletions.
9 changes: 5 additions & 4 deletions examples/autosuggest/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ export default function App() {
const [options, setOptions] = useState<AutosuggestOptions>({
_br_uid_2: uid,
catalog_views: catalog_views,
url: "https://example.com",
ref_url: "https://example.com",
request_id: 12345,
url: window.location.href,
ref_url: window.location.href,
request_id: Date.now(),
br_diagnostic: 'all',
q: '',
})
} as AutosuggestOptions)

const { loading, error, response: data } = useAutoSuggest(config, options);

Expand Down
4 changes: 4 additions & 0 deletions examples/search/custom.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module "*.svg" {
const content: string;
export default content;
}
Loading

0 comments on commit caf8066

Please sign in to comment.