frontend-plugin-api: wrap resolved extension inputs in an object
Co-authored-by: Camila Belo <camilaibs@gmail.com> Co-authored-by: Vincenzo Scamporlino <vincenzos@spotify.com> Co-authored-by: Fredrik Adelöw <freben@gmail.com> Co-authored-by: Philipp Hugenroth <philipph@spotify.com> Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -115,10 +115,10 @@ describe('createSearchResultListItemExtension', () => {
|
||||
);
|
||||
|
||||
const getResultItemComponent = (result: SearchResult) => {
|
||||
const value = inputs.items.find(({ item }) =>
|
||||
item?.predicate?.(result),
|
||||
const value = inputs.items.find(item =>
|
||||
item?.output.item.predicate?.(result),
|
||||
);
|
||||
return value?.item.component ?? DefaultResultItem;
|
||||
return value?.output.item.component ?? DefaultResultItem;
|
||||
};
|
||||
|
||||
const Component = () => {
|
||||
|
||||
Reference in New Issue
Block a user