Use esm exports from react-use library
Signed-off-by: Tomasz Szuba <tszuba@box.com>
This commit is contained in:
committed by
Tomasz Szuba
parent
7825762f90
commit
e8f026a300
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { Fragment, useState } from 'react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
import {
|
||||
ActionExample,
|
||||
scaffolderApiRef,
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
} from '@backstage/core-components';
|
||||
import { useApi, useRouteRef } from '@backstage/core-plugin-api';
|
||||
import { CatalogFilterLayout } from '@backstage/plugin-catalog-react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
ScaffolderTask,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import React from 'react';
|
||||
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
|
||||
import { catalogApiRef, EntityRefLink } from '@backstage/plugin-catalog-react';
|
||||
import { parseEntityRef, UserEntity } from '@backstage/catalog-model';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import React from 'react';
|
||||
import { scaffolderApiRef } from '@backstage/plugin-scaffolder-react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
import { parseEntityRef } from '@backstage/catalog-model';
|
||||
import { EntityRefLink } from '@backstage/plugin-catalog-react';
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import Autocomplete, {
|
||||
AutocompleteChangeReason,
|
||||
} from '@material-ui/lab/Autocomplete';
|
||||
import React, { useCallback, useEffect } from 'react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
import {
|
||||
EntityPickerFilterQueryValue,
|
||||
EntityPickerProps,
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { useState } from 'react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useEffectOnce from 'react-use/lib/useEffectOnce';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
import useEffectOnce from 'react-use/esm/useEffectOnce';
|
||||
import { GetEntityFacetsRequest } from '@backstage/catalog-client';
|
||||
import { makeValidator } from '@backstage/catalog-model';
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
|
||||
@@ -33,7 +33,7 @@ import Autocomplete, {
|
||||
AutocompleteChangeReason,
|
||||
} from '@material-ui/lab/Autocomplete';
|
||||
import React, { useCallback, useEffect } from 'react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
import { FieldValidation } from '@rjsf/utils';
|
||||
import {
|
||||
MultiEntityPickerFilterQueryValue,
|
||||
|
||||
@@ -26,7 +26,7 @@ import { MyGroupsPickerProps, MyGroupsPickerSchema } from './schema';
|
||||
import Autocomplete from '@material-ui/lab/Autocomplete';
|
||||
import { catalogApiRef } from '@backstage/plugin-catalog-react';
|
||||
import { NotFoundError } from '@backstage/errors';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
import { Entity, stringifyEntityRef } from '@backstage/catalog-model';
|
||||
|
||||
export { MyGroupsPickerSchema };
|
||||
|
||||
@@ -18,7 +18,7 @@ import { identityApiRef, useApi } from '@backstage/core-plugin-api';
|
||||
import TextField from '@material-ui/core/TextField';
|
||||
import Autocomplete from '@material-ui/lab/Autocomplete';
|
||||
import React from 'react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
import { EntityPicker } from '../EntityPicker/EntityPicker';
|
||||
|
||||
import { OwnedEntityPickerProps } from './schema';
|
||||
|
||||
@@ -30,7 +30,7 @@ import { RepoUrlPickerRepoName } from './RepoUrlPickerRepoName';
|
||||
import { parseRepoPickerUrl, serializeRepoPickerUrl } from './utils';
|
||||
import { RepoUrlPickerProps } from './schema';
|
||||
import { RepoUrlPickerState } from './types';
|
||||
import useDebounce from 'react-use/lib/useDebounce';
|
||||
import useDebounce from 'react-use/esm/useDebounce';
|
||||
import { useTemplateSecrets } from '@backstage/plugin-scaffolder-react';
|
||||
import Box from '@material-ui/core/Box';
|
||||
import Divider from '@material-ui/core/Divider';
|
||||
|
||||
@@ -19,7 +19,7 @@ import FormControl from '@material-ui/core/FormControl';
|
||||
import FormHelperText from '@material-ui/core/FormHelperText';
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import { scaffolderApiRef } from '@backstage/plugin-scaffolder-react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
|
||||
export const RepoUrlPickerHost = (props: {
|
||||
host?: string;
|
||||
|
||||
@@ -28,7 +28,7 @@ import Check from '@material-ui/icons/Check';
|
||||
import FiberManualRecordIcon from '@material-ui/icons/FiberManualRecord';
|
||||
import Typography from '@material-ui/core/Typography';
|
||||
import { DateTime, Interval } from 'luxon';
|
||||
import useInterval from 'react-use/lib/useInterval';
|
||||
import useInterval from 'react-use/esm/useInterval';
|
||||
import humanizeDuration from 'humanize-duration';
|
||||
import classNames from 'classnames';
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import { useApiHolder } from '@backstage/core-plugin-api';
|
||||
import { JsonObject, JsonValue } from '@backstage/types';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import React, { Component, ReactNode, useMemo, useState } from 'react';
|
||||
import useDebounce from 'react-use/lib/useDebounce';
|
||||
import useDebounce from 'react-use/esm/useDebounce';
|
||||
import yaml from 'yaml';
|
||||
import {
|
||||
LayoutOptions,
|
||||
|
||||
@@ -28,7 +28,7 @@ import Select from '@material-ui/core/Select';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import CloseIcon from '@material-ui/icons/Close';
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
import yaml from 'yaml';
|
||||
import {
|
||||
LayoutOptions,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import { Navigate, useNavigate } from 'react-router-dom';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
import {
|
||||
stringifyEntityRef,
|
||||
ANNOTATION_EDIT_URL,
|
||||
|
||||
Reference in New Issue
Block a user