Createa @backstage/plugin-catalog-common-react package

This commit is contained in:
Oliver Sand
2021-01-26 18:53:29 +01:00
parent aca1ada8dc
commit 019fe39a08
100 changed files with 488 additions and 228 deletions
@@ -21,7 +21,10 @@ import {
ConfigApi,
configApiRef,
} from '@backstage/core';
import { catalogApiRef, CatalogApi } from '@backstage/plugin-catalog';
import {
catalogApiRef,
CatalogApi,
} from '@backstage/plugin-catalog-common-react';
import { wrapInTestApp } from '@backstage/test-utils';
import { render } from '@testing-library/react';
import { RollbarApi, rollbarApiRef } from '../../api/RollbarApi';
@@ -14,19 +14,22 @@
* limitations under the License.
*/
import * as React from 'react';
import {
ApiProvider,
ApiRegistry,
ConfigApi,
configApiRef,
} from '@backstage/core';
import {
CatalogApi,
catalogApiRef,
} from '@backstage/plugin-catalog-common-react';
import { wrapInTestApp } from '@backstage/test-utils';
import { render } from '@testing-library/react';
import * as React from 'react';
import { RollbarApi, rollbarApiRef } from '../../api/RollbarApi';
import { RollbarTopActiveItem } from '../../api/types';
import { RollbarProjectPage } from './RollbarProjectPage';
import { catalogApiRef, CatalogApi } from '@backstage/plugin-catalog';
describe('RollbarProjectPage component', () => {
const items: RollbarTopActiveItem[] = [
@@ -14,12 +14,12 @@
* limitations under the License.
*/
import { useAsync } from 'react-use';
import { useApi } from '@backstage/core';
import {
catalogApiRef,
useEntityCompoundName,
} from '@backstage/plugin-catalog';
} from '@backstage/plugin-catalog-common-react';
import { useAsync } from 'react-use';
export function useCatalogEntity() {
const catalogApi = useApi(catalogApiRef);
@@ -14,9 +14,9 @@
* limitations under the License.
*/
import { configApiRef, useApi } from '@backstage/core';
import { catalogApiRef } from '@backstage/plugin-catalog-common-react';
import { useAsync } from 'react-use';
import { useApi, configApiRef } from '@backstage/core';
import { catalogApiRef } from '@backstage/plugin-catalog';
import { ROLLBAR_ANNOTATION } from '../constants';
export function useRollbarEntities() {