From 23a7e9925b36c74ce8a11f98f2f8877c82a26755 Mon Sep 17 00:00:00 2001 From: Laurent Nguyen Date: Tue, 5 Nov 2024 10:55:37 +0100 Subject: [PATCH] Remove unused variable --- src/Explorer/Tabs/QueryTab/QueryTabComponent.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Explorer/Tabs/QueryTab/QueryTabComponent.tsx b/src/Explorer/Tabs/QueryTab/QueryTabComponent.tsx index 1c2fb9fa2..627bf8145 100644 --- a/src/Explorer/Tabs/QueryTab/QueryTabComponent.tsx +++ b/src/Explorer/Tabs/QueryTab/QueryTabComponent.tsx @@ -125,7 +125,6 @@ interface IQueryTabStates { export const QueryTabCopilotComponent = (props: IQueryTabComponentProps): any => { const styles = useQueryTabStyles(); const copilotStore = useCopilotStore(); - const tabIndex = useTabs.getState().openedTabs.findIndex((tab) => tab.tabId === props.tabId); const isSampleCopilotActive = useSelectedNode.getState().isQueryCopilotCollectionSelected(); const queryTabProps = { @@ -135,21 +134,17 @@ export const QueryTabCopilotComponent = (props: IQueryTabComponentProps): any => (useQueryCopilot().copilotUserDBEnabled || (isSampleCopilotActive && !!userContext.sampleDataConnectionInfo)), isSampleCopilotActive: isSampleCopilotActive, copilotStore: copilotStore, - tabIndex, }; - return ; + return ; }; export const QueryTabComponent = (props: IQueryTabComponentProps): any => { const styles = useQueryTabStyles(); - const tabIndex = useTabs.getState().openedTabs.findIndex((tab) => tab.tabId === props.tabId); - - return ; + return ; }; type QueryTabComponentImplProps = IQueryTabComponentProps & { styles: QueryTabStyles; - tabIndex: number; }; // Inner (legacy) class component. We only use this component via one of the two functional components above (since we need to use the `useQueryTabStyles` hook).