chore: update react imports
Signed-off-by: Paul Schultz <pschultz@pobox.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user