stop using EntityRef in bazaar
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user