diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index 6112875..5923ea4 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -13,13 +13,12 @@ import { } from '@nextui-org/react'; import { Link } from 'react-router-dom'; import { FaSearch } from 'react-icons/fa'; -import { abstractsList } from '../data/list'; -import { matchSorter } from 'match-sorter'; +import { allLists } from '../data/list'; -const sortedAbstractsList = matchSorter(abstractsList, '', { keys: ['name'] }); -const SearchAutocomplete = () => ( +const SearchAutocomplete = ({ allLists }) => ( ( ); const NavbarComponent = () => { + const allItems = Object.values(allLists).flat(); + const sortedAllList = allItems.sort((a, b) => a.name.localeCompare(b.name)); return ( @@ -118,7 +119,7 @@ const NavbarComponent = () => { - +