Skip to content

Commit 01fb78d

Browse files
committed
fix: array
1 parent ea31def commit 01fb78d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

apps/insights/src/components/Root/search-button.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ const SearchDialogContents = ({
181181
const results = useMemo(() => {
182182
const filteredFeeds = matchSorter(feeds, search, {
183183
keys: ["displaySymbol", "symbol", "description", "priceAccount"],
184-
})
185-
.entries()
186-
.map(([symbol, feed]) => ({
187-
type: ResultType.PriceFeed as const,
188-
id: symbol,
189-
...feed,
190-
}));
184+
}).map(({ symbol, ...feed }) => ({
185+
type: ResultType.PriceFeed as const,
186+
id: symbol,
187+
symbol,
188+
...feed,
189+
}));
190+
191191
const filteredPublishers = matchSorter(publishers, search, {
192192
keys: ["publisherKey", "name"],
193193
}).map((publisher) => ({
@@ -197,10 +197,10 @@ const SearchDialogContents = ({
197197
}));
198198

199199
if (type === ResultType.PriceFeed) {
200-
return [...filteredFeeds];
200+
return filteredFeeds;
201201
}
202202
if (type === ResultType.Publisher) {
203-
return [...filteredPublishers];
203+
return filteredPublishers;
204204
}
205205
return [...filteredFeeds, ...filteredPublishers];
206206
}, [feeds, publishers, search, type]);

0 commit comments

Comments
 (0)