From ba4a1eb6460f1035e10b801c53a9d30d13b82582 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 19 Oct 2022 13:55:18 -0700 Subject: [PATCH] Refactor, better handle mouseover --- src/components/{search.jsx => quicklaunch.jsx} | 10 +++++++--- src/pages/index.jsx | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) rename src/components/{search.jsx => quicklaunch.jsx} (92%) diff --git a/src/components/search.jsx b/src/components/quicklaunch.jsx similarity index 92% rename from src/components/search.jsx rename to src/components/quicklaunch.jsx index 596efc459..6fe15c579 100644 --- a/src/components/search.jsx +++ b/src/components/quicklaunch.jsx @@ -4,7 +4,7 @@ import classNames from "classnames"; import { resolveIcon } from "./services/item"; -export default function HomepageSearch({bookmarksAndServices, searchString, setSearchString, isOpen, close}) { +export default function QuickLaunch({bookmarksAndServices, searchString, setSearchString, isOpen, close}) { const { t } = useTranslation(); const searchField = useRef(); @@ -37,6 +37,10 @@ export default function HomepageSearch({bookmarksAndServices, searchString, setS } } + function handleItemHover(event) { + setCurrentItemIndex(parseInt(event.target?.dataset?.index)); + } + function handleItemClick() { resetAndClose(); } @@ -84,9 +88,9 @@ export default function HomepageSearch({bookmarksAndServices, searchString, setS {results.length > 0 &&