chore: update react imports

Signed-off-by: Paul Schultz <pschultz@pobox.com>
This commit is contained in:
Paul Schultz
2025-01-28 10:21:17 -06:00
parent 02981a2377
commit 2e26579e06
1282 changed files with 2776 additions and 3434 deletions
@@ -14,7 +14,6 @@
* limitations under the License.
*/
import React from 'react';
import { Entity } from '@backstage/catalog-model';
import {
useEntity,
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { renderInTestApp } from '@backstage/test-utils';
import { ApiResources } from './ApiResources';
import '@testing-library/jest-dom';
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { useApiResources } from './useApiResources';
import React, { useCallback, useEffect } from 'react';
import { useCallback, useEffect } from 'react';
import { useEntity } from '@backstage/plugin-catalog-react';
import { Table, TableColumn } from '@backstage/core-components';
import { IAPIGroup } from '@kubernetes-models/apimachinery/apis/meta/v1';
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { renderInTestApp } from '@backstage/test-utils';
import { ClusterOverview } from './ClusterOverview';
import '@testing-library/jest-dom';
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useCallback, useEffect } from 'react';
import { useCallback, useEffect } from 'react';
import { InfoCard, StructuredMetadataTable } from '@backstage/core-components';
import { useEntity } from '@backstage/plugin-catalog-react';
import { useCluster } from './useCluster';
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { ApiResources } from '../ApiResources/ApiResources';
import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography';
@@ -13,19 +13,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useCallback, useContext, useState } from 'react';
import {
ReactNode,
createContext,
useCallback,
useContext,
useState,
} from 'react';
export interface ErrorContext {
error?: string;
setError: (message: string) => void;
}
export const KubernetesClusterErrorContext = React.createContext<ErrorContext>({
export const KubernetesClusterErrorContext = createContext<ErrorContext>({
setError: (_: string) => {},
});
export interface KubernetesClusterErrorProviderProps {
children: React.ReactNode;
children: ReactNode;
}
export const KubernetesClusterErrorProvider = ({
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { renderInTestApp } from '@backstage/test-utils';
import { Nodes } from './Nodes';
import '@testing-library/jest-dom';
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { useNodes } from './useNodes';
import React, { useCallback, useEffect } from 'react';
import { useCallback, useEffect } from 'react';
import { useEntity } from '@backstage/plugin-catalog-react';
import {
StructuredMetadataTable,