Merge pull request #8694 from backstage/rugvip/use
use precise imports of react-use hooks
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { useAsync } from 'react-use';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { scaffolderApiRef } from '../../api';
|
||||
import {
|
||||
Typography,
|
||||
|
||||
@@ -45,7 +45,7 @@ import { DateTime, Interval } from 'luxon';
|
||||
import qs from 'qs';
|
||||
import React, { memo, useEffect, useMemo, useState } from 'react';
|
||||
import { generatePath, useNavigate, useParams } from 'react-router';
|
||||
import { useInterval } from 'react-use';
|
||||
import useInterval from 'react-use/lib/useInterval';
|
||||
import { rootRouteRef } from '../../routes';
|
||||
import { Status, TaskOutput } from '../../types';
|
||||
import { useTaskEventStream } from '../hooks/useEventStream';
|
||||
|
||||
@@ -20,7 +20,7 @@ import qs from 'qs';
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { generatePath, Navigate, useNavigate } from 'react-router';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { useAsync } from 'react-use';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { scaffolderApiRef } from '../../api';
|
||||
import { CustomFieldValidator, FieldExtensionOptions } from '../../extensions';
|
||||
import { rootRouteRef } from '../../routes';
|
||||
|
||||
@@ -23,7 +23,7 @@ import FormControl from '@material-ui/core/FormControl';
|
||||
import Autocomplete from '@material-ui/lab/Autocomplete';
|
||||
import { FieldProps, UiSchema } from '@rjsf/core';
|
||||
import React, { useCallback, useEffect } from 'react';
|
||||
import { useAsync } from 'react-use';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
|
||||
export const allowArbitraryValues = (uiSchema: UiSchema): boolean =>
|
||||
(uiSchema['ui:options']?.allowArbitraryValues as boolean) ?? true;
|
||||
|
||||
@@ -27,7 +27,7 @@ import Input from '@material-ui/core/Input';
|
||||
import InputLabel from '@material-ui/core/InputLabel';
|
||||
import { FieldProps } from '@rjsf/core';
|
||||
import React, { useCallback, useEffect } from 'react';
|
||||
import { useAsync } from 'react-use';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { scaffolderApiRef } from '../../../api';
|
||||
|
||||
function splitFormData(url: string | undefined, allowedOwners?: string[]) {
|
||||
|
||||
Reference in New Issue
Block a user