diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index 1082abd..cb7724e 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -25,12 +25,20 @@ const SearchAutocomplete = ({ allLists }) => { } }; - const itemToString = (item) => (item ? `${item.name} - ${item.artist}` : ''); + const itemToString = (item) => { + return item ? `${item.name} - ${item.artistInfo.name}` : ''; + }; + + const filterItems = (item, query) => { + const searchString = `${item.name} ${item.artistInfo.name}`.toLowerCase(); + return searchString.includes(query.toLowerCase()); + }; return ( {
{item.name} - {item.artist} + {item.artistInfo.name}
diff --git a/src/pages/ArtDescription.jsx b/src/pages/ArtDescription.jsx index 8ff0646..5eb3910 100644 --- a/src/pages/ArtDescription.jsx +++ b/src/pages/ArtDescription.jsx @@ -35,7 +35,9 @@ const ArtDescription = () => {

{artItem.name}

-

by {artItem.artist}

+

+ by {artItem.artistInfo.name} +