mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-06 21:57:48 +01:00
services should come first
This commit is contained in:
@@ -4,7 +4,7 @@ import classNames from "classnames";
|
||||
|
||||
import { resolveIcon } from "./services/item";
|
||||
|
||||
export default function QuickLaunch({bookmarksAndServices, searchString, setSearchString, isOpen, close}) {
|
||||
export default function QuickLaunch({servicesAndBookmarks, searchString, setSearchString, isOpen, close}) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const searchField = useRef();
|
||||
@@ -53,13 +53,13 @@ export default function QuickLaunch({bookmarksAndServices, searchString, setSear
|
||||
useEffect(() => {
|
||||
if (searchString.length === 0) setResults([]);
|
||||
else {
|
||||
const newResults = bookmarksAndServices.filter(r => r.name.toLowerCase().includes(searchString));
|
||||
const newResults = servicesAndBookmarks.filter(r => r.name.toLowerCase().includes(searchString));
|
||||
setResults(newResults);
|
||||
if (newResults.length) {
|
||||
setCurrentItemIndex(0);
|
||||
}
|
||||
}
|
||||
}, [searchString, bookmarksAndServices])
|
||||
}, [searchString, servicesAndBookmarks])
|
||||
|
||||
|
||||
const [hidden, setHidden] = useState(true);
|
||||
|
||||
Reference in New Issue
Block a user