From 09a7f8f285e45bedbac4af2064c3d631882e21b3 Mon Sep 17 00:00:00 2001 From: Renan Mendes Carvalho Date: Tue, 19 Sep 2023 11:19:46 +0200 Subject: [PATCH] refactoring(plugins/home): Don't export getToEntityRef Signed-off-by: Renan Mendes Carvalho Co-authored-by: Camila Belo --- plugins/home/api-report.md | 10 ---------- plugins/home/src/components/VisitListener.tsx | 3 +-- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/plugins/home/api-report.md b/plugins/home/api-report.md index acc073f685..7f96f24240 100644 --- a/plugins/home/api-report.md +++ b/plugins/home/api-report.md @@ -22,7 +22,6 @@ import { ReactNode } from 'react'; import { RendererProps as RendererProps_2 } from '@backstage/plugin-home-react'; import { RouteRef } from '@backstage/core-plugin-api'; import { SetStateAction } from 'react'; -import { stringifyEntityRef } from '@backstage/catalog-model'; // @public export type Breakpoint = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'; @@ -108,15 +107,6 @@ export const DoNotTrack: ({ children?: ReactNode; }) => JSX.Element; -// @public -export const getToEntityRef: ({ - rootPath, - stringifyEntityRefImpl, -}?: { - rootPath?: string | undefined; - stringifyEntityRefImpl?: typeof stringifyEntityRef | undefined; -}) => ({ pathname }: { pathname: string }) => string | undefined; - // @public export const getVisitName: (document: Document) => () => string; diff --git a/plugins/home/src/components/VisitListener.tsx b/plugins/home/src/components/VisitListener.tsx index cb92b47738..c564301525 100644 --- a/plugins/home/src/components/VisitListener.tsx +++ b/plugins/home/src/components/VisitListener.tsx @@ -46,7 +46,6 @@ export const VisitListenerContext = createContext( ); /** - * @public * This function returns an implementation of toEntityRef which is responsible * for receiving a pathname and maybe returning an entityRef compatible with the * catalog-model. @@ -57,7 +56,7 @@ export const VisitListenerContext = createContext( * toEntityRef(\{ pathname: "/catalog/default/component/playback-order" \}) * // returns "component:default/playback-order" */ -export const getToEntityRef = +const getToEntityRef = ({ rootPath = 'catalog', stringifyEntityRefImpl = stringifyEntityRef,