diff --git a/react/src/components/AvailableResourcesCard.tsx b/react/src/components/AvailableResourcesCard.tsx index 13c5c2745..69fe66c6c 100644 --- a/react/src/components/AvailableResourcesCard.tsx +++ b/react/src/components/AvailableResourcesCard.tsx @@ -3,7 +3,6 @@ import { useCurrentProjectValue } from '../hooks/useCurrentProject'; import { useResourceLimitAndRemaining } from '../hooks/useResourceLimitAndRemaining'; import BAIProgressWithLabel from './BAIProgressWithLabel'; import Flex from './Flex'; -import ResourceGroupSelect from './ResourceGroupSelect'; import ResourceGroupSelectForCurrentProject from './ResourceGroupSelectForCurrentProject'; import { QuestionCircleOutlined, ReloadOutlined } from '@ant-design/icons'; import { Button, Card, Tooltip } from 'antd'; diff --git a/react/src/components/ResourceGroupSelect.tsx b/react/src/components/ResourceGroupSelect.tsx index 8e82d949a..4eb905b6e 100644 --- a/react/src/components/ResourceGroupSelect.tsx +++ b/react/src/components/ResourceGroupSelect.tsx @@ -2,11 +2,10 @@ import { useBaiSignedRequestWithPromise } from '../helper'; import { useUpdatableState } from '../hooks'; import { useSuspenseTanQuery } from '../hooks/reactQueryAlias'; import useControllableState from '../hooks/useControllableState'; -import { useCurrentProjectValue } from '../hooks/useCurrentProject'; import TextHighlighter from './TextHighlighter'; import { Select, SelectProps } from 'antd'; import _ from 'lodash'; -import React, { useEffect, useTransition } from 'react'; +import React, { useEffect } from 'react'; interface ResourceGroupSelectProps extends SelectProps { projectName: string; @@ -24,7 +23,7 @@ const ResourceGroupSelect: React.FC = ({ ...selectProps }) => { const baiRequestWithPromise = useBaiSignedRequestWithPromise(); - const [fetchKey, updateFetchKey] = useUpdatableState('first'); + const [fetchKey] = useUpdatableState('first'); const [controllableSearchValue, setControllableSearchValue] = useControllableState({ value: searchValue, @@ -34,7 +33,6 @@ const ResourceGroupSelect: React.FC = ({ const [controllableValue, setControllableValue] = useControllableState(selectProps); - const [isPendingLoading, startLoadingTransition] = useTransition(); const { data: resourceGroupSelectQueryResult } = useSuspenseTanQuery< [ { @@ -147,7 +145,7 @@ const ResourceGroupSelect: React.FC = ({ // }); // } }} - loading={isPendingLoading || loading} + loading={loading} options={_.map(resourceGroups, (resourceGroup) => { return { value: resourceGroup.name, label: resourceGroup.name }; })}