From 637eb94bb64a4ec46f692a6756bd20b5977f0f4e Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Fri, 10 May 2024 13:25:45 +0200 Subject: [PATCH] cleanup --- .../src/lib/components/homeTabGetStarted.tsx | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx index eb7674ebb6..52806180f7 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx @@ -148,32 +148,6 @@ function HomeTabGetStarted({ plugin }: HomeTabGetStartedProps) { _paq.push(['trackEvent', 'hometab', 'homeGetStarted', templateName]) } - const [activeButtonClass, setActiveButtonClass] = useState('') - const [activeButton, setActiveButton] = useState('') - - useEffect(() => { - const checkWorkspaceName = async () => { - const currentWorkspace = await plugin.call('filePanel', 'getCurrentWorkspace') - const getWorkspaces = await plugin.call('filePanel', 'getWorkspaces') - // setActiveButton(currentWorkspace.name) - console.log('activeButton', { activeButton, currentWorkspace, getWorkspaces }) - } - checkWorkspaceName() - }, []) - const manipulateClasses = async (e: SyntheticEvent) => { - const target = e.target as HTMLButtonElement - // if btn-primary is active, remove it based on the following conditions: - // 1. Most importantly, if the activeButton is the same as the data-id of any of the buttons - // then that button should be active - // 2. If the activeButton is not the same as the data-id of any of the buttons - // then the first button should be active - const currentWorkspace = await plugin.call('filePanel', 'getCurrentWorkspace') - const allworkspaces = await plugin.call('filePanel', 'getWorkspaces') - console.log('currentWorkspace', { currentWorkspace, allworkspaces }) - if (target.classList.contains('btn-primary') && target.dataset.id.includes(activeButton)) { - } - } - return (