Skip to content

Commit bcaf2ae

Browse files
committed
Update docs
1 parent 55e32dd commit bcaf2ae

File tree

1 file changed

+19
-3
lines changed
  • workspaces/confluence/plugins/search-confluence-frontend

1 file changed

+19
-3
lines changed

workspaces/confluence/plugins/search-confluence-frontend/README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Add the plugin to your frontend app:
1717

1818
Add The Confluence Search Component to : `packages/app/src/components/search/SearchPage.tsx `
1919

20-
```typescript
20+
```tsx
2121
// packages/app/src/components/search/SearchPage.tsx
2222

2323
import {
@@ -39,7 +39,23 @@ import {
3939
/>
4040

4141
<SearchResult>
42-
// ...
43-
<ConfluenceResultListItem />
42+
{({ results }) => (
43+
<List>
44+
{results.map(({ type, document, highlight, rank }) => {
45+
switch (type) {
46+
// Add the following case to the switch statement above the default case
47+
case 'confluence':
48+
return (
49+
<ConfluenceResultListItem
50+
key={document.location}
51+
result={document}
52+
highlight={highlight}
53+
/>
54+
);
55+
// ...
56+
}
57+
})}
58+
</List>
59+
)}
4460
</SearchResult>
4561
```

0 commit comments

Comments
 (0)