diff --git a/src/component/video/use-video-details.tsx b/src/component/video/use-video-details.tsx index 855c035..df09bf7 100644 --- a/src/component/video/use-video-details.tsx +++ b/src/component/video/use-video-details.tsx @@ -32,25 +32,25 @@ function useDropdown( options: Array<{ label: string; value: T }>, closeOthers: () => void, ) { - const [isOpen, setIsOpen] = useState(false); + const [isDropdownOpen, setIsDropdownOpen] = useState(false); const [value, setValue] = useState(initialValue); const [optionsList, setOptionsList] = useState(options); const toggleOpen = useCallback(() => { - if (!isOpen) { + if (!isDropdownOpen) { closeOthers(); } - setIsOpen(!isOpen); - }, [isOpen, closeOthers]); + setIsDropdownOpen(!isDropdownOpen); + }, [isDropdownOpen, closeOthers]); return { - isOpen, + isDropdownOpen, toggleOpen, value, setValue, optionsList, setOptionsList, - setIsOpen, + setIsDropdownOpen, }; } @@ -76,8 +76,8 @@ export const useVideoDetails = ({ ); const closeAllDropdowns = useCallback(() => { - gameType.setIsOpen(false); - tableSize.setIsOpen(false); + gameType.setIsDropdownOpen(false); + tableSize.setIsDropdownOpen(false); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); diff --git a/src/screens/video-stack/video-details.tsx b/src/screens/video-stack/video-details.tsx index 39fcbe5..324bb2c 100644 --- a/src/screens/video-stack/video-details.tsx +++ b/src/screens/video-stack/video-details.tsx @@ -47,7 +47,7 @@ export default function VideoDetails({ navigation, route }): React.JSX.Element {