( data: SerializedSearchMessage[] )
| 6 | import type { ApiClient } from '@linen/api-client'; |
| 7 | |
| 8 | const parseResults = ( |
| 9 | data: SerializedSearchMessage[] |
| 10 | ): (SerializedSearchMessage & { value: string })[] => { |
| 11 | const allIds = new Set(); |
| 12 | return data |
| 13 | .map((r) => ({ ...r, value: r.body })) |
| 14 | .filter((r) => { |
| 15 | if (!r.threadId) return false; |
| 16 | if (allIds.has(r.id)) return false; |
| 17 | allIds.add(r.id); |
| 18 | return true; |
| 19 | }); |
| 20 | }; |
| 21 | |
| 22 | const SearchBar = ({ |
| 23 | className, |
no test coverage detected