Merge pull request #8694 from backstage/rugvip/use
use precise imports of react-use hooks
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { useCopyToClipboard } from 'react-use';
|
||||
import useCopyToClipboard from 'react-use/lib/useCopyToClipboard';
|
||||
|
||||
import { useRouteRef, useApi, configApiRef } 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';
|
||||
import useCopyToClipboard from 'react-use/lib/useCopyToClipboard';
|
||||
import { capitalize } from 'lodash';
|
||||
import {
|
||||
CodeSnippet,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import { useAsync } from 'react-use';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
import { CSSProperties } from '@material-ui/styles';
|
||||
import {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { useAsync } from 'react-use';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { techdocsApiRef } from '../../api';
|
||||
import { TechDocsNotFound } from './TechDocsNotFound';
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { useOutlet } from 'react-router';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { useAsync } from 'react-use';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { techdocsApiRef } from '../../api';
|
||||
import { TechDocsNotFound } from './TechDocsNotFound';
|
||||
import { LegacyTechDocsPage } from './LegacyTechDocsPage';
|
||||
|
||||
@@ -27,7 +27,7 @@ import SearchIcon from '@material-ui/icons/Search';
|
||||
import Autocomplete from '@material-ui/lab/Autocomplete';
|
||||
import React, { ChangeEvent, useEffect, useState } from 'react';
|
||||
import { useNavigate } from 'react-router';
|
||||
import { useDebounce } from 'react-use';
|
||||
import useDebounce from 'react-use/lib/useDebounce';
|
||||
import { DocsResultListItem } from '../../components/DocsResultListItem';
|
||||
|
||||
type TechDocsSearchProps = {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { EntityName } from '@backstage/catalog-model';
|
||||
import { useAsyncRetry } from 'react-use';
|
||||
import useAsyncRetry from 'react-use/lib/useAsyncRetry';
|
||||
import { AsyncState } from 'react-use/lib/useAsync';
|
||||
import { techdocsStorageApiRef } from '../../api';
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import { useMemo, useReducer, useRef } from 'react';
|
||||
import { useAsync, useAsyncRetry } from 'react-use';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import useAsyncRetry from 'react-use/lib/useAsyncRetry';
|
||||
import { techdocsStorageApiRef } from '../../api';
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user