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
@@ -55,15 +55,15 @@ When using ALB authentication Backstage will only be loaded once the user has su
- add the following definition just before the app is created (`const app = createApp`):
```ts
import React from 'react';
import { useState, useEffect } from 'react';
import { UserIdentity } from '@backstage/core-components';
import { SignInPageProps } from '@backstage/core-app-api';
import { useApi, configApiRef } from '@backstage/core-plugin-api';
const SampleSignInComponent: any = (props: SignInPageProps) => {
const [error, setError] = React.useState<string | undefined>();
const [error, setError] = useState<string | undefined>();
const config = useApi(configApiRef);
React.useEffect(() => {
useEffect(() => {
const shouldAuth = !!config.getOptionalConfig('auth.providers.awsalb');
if (shouldAuth) {
fetch(`${window.location.origin}/api/auth/awsalb/refresh`)
@@ -3,7 +3,6 @@
ExampleComponent.tsx reference
```tsx
import React from 'react';
import { Typography, Grid } from '@material-ui/core';
import { identityApiRef, useApi } from '@backstage/core-plugin-api';
import {
@@ -3,7 +3,6 @@
ExampleFetchComponent.tsx reference
```tsx
import React from 'react';
import useAsync from 'react-use/lib/useAsync';
import Alert from '@material-ui/lab/Alert';
import { githubAuthApiRef, useApi } from '@backstage/core-plugin-api';
@@ -1,7 +1,6 @@
ConfluenceResultListItem.tsx reference
```tsx
import React from 'react';
import { Link } from '@backstage/core-components';
import { IndexableDocument } from '@backstage/plugin-search-common';
import {