Use esm exports from react-use library

Signed-off-by: Tomasz Szuba <tszuba@box.com>
This commit is contained in:
Tomasz Szuba
2024-03-15 10:23:57 +01:00
committed by Tomasz Szuba
parent 7825762f90
commit e8f026a300
268 changed files with 379 additions and 293 deletions
@@ -17,7 +17,7 @@
import { Team } from '@backstage/plugin-azure-devops-common';
import { azureDevOpsApiRef } from '../api';
import { useApi } from '@backstage/core-plugin-api';
import useAsync from 'react-use/lib/useAsync';
import useAsync from 'react-use/esm/useAsync';
export function useAllTeams(): {
teams?: Team[];
@@ -22,7 +22,7 @@ import {
import { azureDevOpsApiRef } from '../api';
import { useApi } from '@backstage/core-plugin-api';
import useAsync from 'react-use/lib/useAsync';
import useAsync from 'react-use/esm/useAsync';
import { getAnnotationValuesFromEntity } from '../utils';
import { Entity, stringifyEntityRef } from '@backstage/catalog-model';
@@ -15,8 +15,8 @@
*/
import { errorApiRef, useApi } from '@backstage/core-plugin-api';
import useAsyncRetry from 'react-use/lib/useAsyncRetry';
import useInterval from 'react-use/lib/useInterval';
import useAsyncRetry from 'react-use/esm/useAsyncRetry';
import useInterval from 'react-use/esm/useInterval';
import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common';
import { azureDevOpsApiRef } from '../api';
+1 -1
View File
@@ -19,7 +19,7 @@ import { GitTag } from '@backstage/plugin-azure-devops-common';
import { Entity, stringifyEntityRef } from '@backstage/catalog-model';
import { azureDevOpsApiRef } from '../api';
import { useApi } from '@backstage/core-plugin-api';
import useAsync from 'react-use/lib/useAsync';
import useAsync from 'react-use/esm/useAsync';
import { getAnnotationValuesFromEntity } from '../utils';
export function useGitTags(entity: Entity): {
@@ -24,7 +24,7 @@ import {
import { Entity, stringifyEntityRef } from '@backstage/catalog-model';
import { azureDevOpsApiRef } from '../api';
import { useApi } from '@backstage/core-plugin-api';
import useAsync from 'react-use/lib/useAsync';
import useAsync from 'react-use/esm/useAsync';
import { getAnnotationValuesFromEntity } from '../utils';
export function usePullRequests(
+1 -1
View File
@@ -19,7 +19,7 @@ import { Readme } from '@backstage/plugin-azure-devops-common';
import { Entity, stringifyEntityRef } from '@backstage/catalog-model';
import { azureDevOpsApiRef } from '../api';
import { useApi } from '@backstage/core-plugin-api';
import useAsync from 'react-use/lib/useAsync';
import useAsync from 'react-use/esm/useAsync';
import { getAnnotationValuesFromEntity } from '../utils';
export function useReadme(entity: Entity): {
@@ -15,7 +15,7 @@
*/
import { identityApiRef, useApi } from '@backstage/core-plugin-api';
import useAsync from 'react-use/lib/useAsync';
import useAsync from 'react-use/esm/useAsync';
export function useUserEmail(): string | undefined {
const identityApi = useApi(identityApiRef);
@@ -16,7 +16,7 @@
import { azureDevOpsApiRef } from '../api';
import { useApi } from '@backstage/core-plugin-api';
import useAsync from 'react-use/lib/useAsync';
import useAsync from 'react-use/esm/useAsync';
export function useUserTeamIds(userId: string | undefined): {
teamIds?: string[];