From 14fff6dcf254686c536404952a02edd3c7fc23df Mon Sep 17 00:00:00 2001 From: David Walsh Date: Fri, 23 Oct 2020 15:01:50 -0500 Subject: [PATCH] Lint --- .../dropdown-search-list/dropdown-search-list.js | 13 ++++++------- .../item-list/item-list.component.js | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.js b/ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.js index ca24cc7f4..bcaef3731 100644 --- a/ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.js +++ b/ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.js @@ -26,19 +26,18 @@ export default function DropdownSearchList ({ hideItemIf, listContainerClassName, }) { + const t = useContext(I18nContext) + const [isOpen, setIsOpen] = useState(false) + const [selectedItem, setSelectedItem] = useState(startingItem) const close = () => { setIsOpen(false) onClose && onClose() } - - const t = useContext(I18nContext) - const [isOpen, setIsOpen] = useState(false) - const [selectedItem, setSelectedItem] = useState(startingItem) const onClickItem = useCallback((item) => { onSelect && onSelect(item) setSelectedItem(item) - close(); - }, [onClose, onSelect]) + close() + }, [onSelect]) const onClickSelector = useCallback(() => { if (!isOpen) { @@ -65,7 +64,7 @@ export default function DropdownSearchList ({