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
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import useCopyToClipboard from 'react-use/lib/useCopyToClipboard';
|
||||
import useCopyToClipboard from 'react-use/esm/useCopyToClipboard';
|
||||
|
||||
import { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';
|
||||
import { Entity, RELATION_OWNED_BY } from '@backstage/catalog-model';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import useCopyToClipboard from 'react-use/lib/useCopyToClipboard';
|
||||
import useCopyToClipboard from 'react-use/esm/useCopyToClipboard';
|
||||
import { capitalize } from 'lodash';
|
||||
import {
|
||||
CodeSnippet,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import { CSSProperties } from '@material-ui/styles/withStyles';
|
||||
import {
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { CompoundEntityRef } from '@backstage/catalog-model';
|
||||
import useAsyncRetry from 'react-use/lib/useAsyncRetry';
|
||||
import { AsyncState } from 'react-use/lib/useAsync';
|
||||
import useAsyncRetry from 'react-use/esm/useAsyncRetry';
|
||||
import { AsyncState } from 'react-use/esm/useAsync';
|
||||
import { techdocsStorageApiRef } from '../../api';
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import { useMemo, useReducer, useRef } from 'react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsyncRetry from 'react-use/lib/useAsyncRetry';
|
||||
import useAsync from 'react-use/esm/useAsync';
|
||||
import useAsyncRetry from 'react-use/esm/useAsyncRetry';
|
||||
import { techdocsStorageApiRef } from '@backstage/plugin-techdocs-react';
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@ import { createTestShadowDom } from '../../test-utils';
|
||||
import { copyToClipboard } from './copyToClipboard';
|
||||
import { lightTheme } from '@backstage/theme';
|
||||
import { act, waitFor } from '@testing-library/react';
|
||||
import useCopyToClipboard from 'react-use/lib/useCopyToClipboard';
|
||||
import useCopyToClipboard from 'react-use/esm/useCopyToClipboard';
|
||||
|
||||
const clipboardSpy = jest.fn();
|
||||
Object.defineProperty(window.navigator, 'clipboard', {
|
||||
|
||||
@@ -22,7 +22,7 @@ import Tooltip from '@material-ui/core/Tooltip';
|
||||
import { withStyles, Theme } from '@material-ui/core/styles';
|
||||
import IconButton from '@material-ui/core/IconButton';
|
||||
import type { Transformer } from './transformer';
|
||||
import useCopyToClipboard from 'react-use/lib/useCopyToClipboard';
|
||||
import useCopyToClipboard from 'react-use/esm/useCopyToClipboard';
|
||||
|
||||
const CopyToClipboardTooltip = withStyles(theme => ({
|
||||
tooltip: {
|
||||
|
||||
Reference in New Issue
Block a user