Skip to content

Commit 87b42a3

Browse files
committed
update
1 parent 8fc8941 commit 87b42a3

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

js/components/useDocsSearch/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Getting Started
44

5-
To use the search component, you need to initialize it by passing the URL of the edge function created from the dashboard. [More details below](#edge-function).
5+
To use the search component, [you need to initialize](#edge-function) it by passing the URL of the edge function created from the dashboard.
66

7-
```
7+
```js
88
import { useDocsSearch } from ./index";
99
1010
function Search() {
@@ -37,15 +37,16 @@ function Search() {
3737
## Typescript
3838
The following types can be imported and used:
3939

40-
```
41-
import { useDocsSearch } from ./index";
40+
```ts
41+
import type { SearchResult, SearchError, SqlcSearchReturn } from "./index";
4242
```
4343

4444

4545
## Edge Function
4646

47-
The code for the edge function to be created is as follows [(Edge Functions documentation)](https://docs.sqlitecloud.io/docs/introduction/edge_functions):
48-
```
47+
The code for the [edge function](https://docs.sqlitecloud.io/docs/introduction/edge_functions) to be created is as follows:
48+
49+
```js
4950
const query = request.params.query;
5051
const requestid = request.params.requestid;
5152
return {
@@ -61,7 +62,7 @@ return {
6162

6263

6364
## Demo
64-
[LIVE DEMO](https://sqlc-react-search.vercel.app/)
65+
[LIVE DEMO](https://use-docs-search.vercel.app/)
6566

6667
We provide a simple example that shows how to use the component in the `tester.js` [file](https://github.com/sqlitecloud/examples/blob/main/js/components/useDocsSearch/src/tester.js).
6768

0 commit comments

Comments
 (0)