mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-07 22:28:48 +00:00
services should come first
This commit is contained in:
parent
b5410eea12
commit
484d69a4b5
2 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue