From f95eff5712c74072f717fb0527f1afee7318d290 Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 21 Nov 2024 17:30:00 -0800 Subject: [PATCH] Update AddFileButton.tsx --- gui/src/pages/Edit/AddFileButton.tsx | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/gui/src/pages/Edit/AddFileButton.tsx b/gui/src/pages/Edit/AddFileButton.tsx index 93611e9f7..65470c7ad 100644 --- a/gui/src/pages/Edit/AddFileButton.tsx +++ b/gui/src/pages/Edit/AddFileButton.tsx @@ -7,7 +7,6 @@ import { addCodeToEdit } from "../../redux/slices/editModeState"; import { Listbox } from "@headlessui/react"; export default function AddFileButton() { - const [showAbove, setShowAbove] = useState(false); const buttonRef = useRef(null); const ideMessenger = useContext(IdeMessengerContext); const dispatch = useDispatch(); @@ -21,27 +20,15 @@ export default function AddFileButton() { for (const filepath of openFiles) { const contents = await ideMessenger.ide.readFile(filepath); - console.log({ filepath, contents }); dispatch(addCodeToEdit({ filepath, contents })); } } - // function calculatePosition() { - // const rect = buttonRef.current?.getBoundingClientRect(); - // if (!rect) return; - // const spaceBelow = window.innerHeight - rect.bottom; - // const spaceAbove = rect.top; - // const dropdownHeight = 300; - - // setShowAbove(spaceBelow < dropdownHeight && spaceAbove > spaceBelow); - // } - return (