diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index 8abd810..1082abd 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -24,6 +24,9 @@ const SearchAutocomplete = ({ allLists }) => { navigate(`/art/${id}`); } }; + + const itemToString = (item) => (item ? `${item.name} - ${item.artist}` : ''); + return ( { startContent={} radius="full" variant="bordered" - onSelectionChange={(key) => handleSelectionChange(key)} - itemToString={(item) => item?.name} + onSelectionChange={handleSelectionChange} + itemToString={itemToString} > {(item) => ( - +