From 07ce1b4873dd34ec25a60fe424814899e2cb9e52 Mon Sep 17 00:00:00 2001 From: Justin Date: Tue, 31 May 2022 15:03:41 +0000 Subject: [PATCH] Apply 2 suggestion(s) to 1 file(s) --- .../features/compose/components/privacy_dropdown.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/soapbox/features/compose/components/privacy_dropdown.tsx b/app/soapbox/features/compose/components/privacy_dropdown.tsx index 1042320f2..660207959 100644 --- a/app/soapbox/features/compose/components/privacy_dropdown.tsx +++ b/app/soapbox/features/compose/components/privacy_dropdown.tsx @@ -39,7 +39,7 @@ const PrivacyDropdownMenu: React.FC = ({ style, items, pla const node = useRef(null); const focusedItem = useRef(null); - const [mounted, setMounted] = useState(false); + const [mounted, setMounted] = useState(false); const handleDocumentClick = (e: MouseEvent | TouchEvent) => { if (node.current && !node.current.contains(e.target as HTMLElement)) { @@ -49,9 +49,7 @@ const PrivacyDropdownMenu: React.FC = ({ style, items, pla const handleKeyDown: React.KeyboardEventHandler = e => { const value = e.currentTarget.getAttribute('data-index'); - const index = items.findIndex(item => { - return (item.value === value); - }); + const index = items.findIndex(item => item.value === value); let element = null; switch (e.key) {