File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed
workspaces/confluence/plugins/search-confluence-frontend Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Add the plugin to your frontend app:
1717
1818Add 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
2323import {
@@ -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```
You can’t perform that action at this time.
0 commit comments