diff --git a/src/components/App.tsx b/src/components/App.tsx index 7552018..1a69ccd 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -27,7 +27,7 @@ function App(): JSX.Element { return (
- {exerciseCount < 7 ? ( + {exerciseCount < 3 ? ( <> { setText(event.target.value, id); }; - const [isInputFocused, setIsInputFocused] = useState(false); - - useEffect(() => { - const input = document.getElementById(`unitcircle-check-box-${label}`); - - // if (id === 0) { - // focusedList.push(true); - // } else { - // focusedList.push(false); - // } - - const focusListener = () => { - setIsInputFocused(true); - }; - - const blurListener = () => { - setIsInputFocused(false); - }; - - if (input) { - input.addEventListener('focus', focusListener); - input.addEventListener('blur', blurListener); - } - - // Clean up event listeners when component unmounts - return () => { - if (input) { - input.removeEventListener('focus', focusListener); - input.removeEventListener('blur', blurListener); - } - }; - }, []); - - // useEffect(() => { - // for (let i = 0; i < focusedList.length; i++) { - // if (inputText[id]) { - // focusedList[i] = true; - // } - // } - // for (let i = 1; i < focusedList.length; i++) { - // if (focusedList[i] === false && !inputText[id - 1]) { - // setIsInputFocused(true); - // break; - // } - // } - // }, []); - - // console.log(focusedList[id]); - /* lines 25-35, try to get component to look like this */ return (
-

+

{label} = {direction}{' '}

);