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).