From fbc6f27b7fdfca40a9e3599772960a6e3a733c70 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 22 Jan 2023 20:34:48 -0800 Subject: [PATCH] Remove unused code --- components/TranscendencePopover/index.tsx | 32 ----------------------- components/TranscendenceStar/index.tsx | 1 - 2 files changed, 33 deletions(-) diff --git a/components/TranscendencePopover/index.tsx b/components/TranscendencePopover/index.tsx index 0b41ac92..513b4053 100644 --- a/components/TranscendencePopover/index.tsx +++ b/components/TranscendencePopover/index.tsx @@ -42,33 +42,6 @@ const TranscendencePopover = ({ Pending: stage != currentStage, }) - useEffect(() => { - const handleClickOutside = (event: Event) => { - const target = event.target instanceof Element ? event.target : null - - console.log('Handling click outside...?') - - console.log(popoverRef.current) - console.log(open) - - if ( - popoverRef.current && - target && - !popoverRef.current.contains(target) && - open && - onOpenChange - ) { - onOpenChange(false) - } - } - - document.addEventListener('click', handleClickOutside, true) - - return () => { - document.removeEventListener('click', handleClickOutside, true) - } - }, [onOpenChange]) - useEffect(() => { if (open) popoverRef.current?.focus() }, []) @@ -79,11 +52,6 @@ const TranscendencePopover = ({ useEffect(() => { setOpen(popoverOpen) - - if (popoverOpen) { - console.log(popoverRef.current) - popoverRef.current?.focus() - } }, [popoverOpen]) function handleFragmentClicked(newStage: number) { diff --git a/components/TranscendenceStar/index.tsx b/components/TranscendenceStar/index.tsx index 8954d4b1..161be68b 100644 --- a/components/TranscendenceStar/index.tsx +++ b/components/TranscendenceStar/index.tsx @@ -51,7 +51,6 @@ const TranscendenceStar = ({ }) useEffect(() => { - console.log(`Setting visible stage to ${stage}`) setVisibleStage(stage) setCurrentStage(stage) }, [stage])