stop using EntityRef in bazaar

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-02-23 11:14:03 +01:00
parent 3f480db963
commit 410e592552
3 changed files with 3 additions and 6 deletions
@@ -47,7 +47,6 @@ import useAsyncFn from 'react-use/lib/useAsyncFn';
import { catalogApiRef, entityRouteRef } from '@backstage/plugin-catalog-react';
import {
parseEntityName,
stringifyEntityRef,
Entity,
parseEntityRef,
@@ -150,7 +149,7 @@ export const HomePageBazaarInfoCard = ({
const getEntityPageLink = () => {
if (bazaarProject?.value?.entityRef) {
const { name, kind, namespace } = parseEntityName(
const { name, kind, namespace } = parseEntityRef(
bazaarProject.value.entityRef,
);
return entityLink({ kind, namespace, name });
@@ -107,7 +107,7 @@ export const SortView = () => {
if (catalogEntityRefs) {
bazaarProjects.value?.forEach(async (project: BazaarProject) => {
if (project.entityRef) {
if (!catalogEntityRefs?.includes(project.entityRef as string)) {
if (!catalogEntityRefs?.includes(project.entityRef)) {
await bazaarApi.updateProject({
...project,
entityRef: null,
+1 -3
View File
@@ -14,8 +14,6 @@
* limitations under the License.
*/
import { EntityRef } from '@backstage/catalog-model';
export type Member = {
itemId: number;
userId: string;
@@ -30,7 +28,7 @@ export type Size = 'small' | 'medium' | 'large';
export type BazaarProject = {
name: string;
id: number;
entityRef?: EntityRef;
entityRef?: string;
community: string;
status: Status;
description: string;