From e10a5eaae54540fa148ffb5234aca33d6c5e9342 Mon Sep 17 00:00:00 2001 From: Camila Belo Date: Mon, 2 Oct 2023 13:25:43 +0200 Subject: [PATCH] fix(home): annotate `getVisitName` as internal utility Signed-off-by: Camila Belo --- plugins/home/api-report.md | 9 --------- plugins/home/src/components/VisitListener.tsx | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/plugins/home/api-report.md b/plugins/home/api-report.md index 8b43f59811..14f685cfc1 100644 --- a/plugins/home/api-report.md +++ b/plugins/home/api-report.md @@ -101,15 +101,6 @@ export type CustomHomepageGridProps = { preventCollision?: boolean; }; -// @public -export const getVisitName: ({ - rootPath, - document, -}?: { - rootPath?: string | undefined; - document?: Document | undefined; -}) => ({ pathname }: { pathname: string }) => string; - // @public export const HeaderWorldClock: (props: { clockConfigs: ClockConfig[]; diff --git a/plugins/home/src/components/VisitListener.tsx b/plugins/home/src/components/VisitListener.tsx index de7d16e44f..866fd69885 100644 --- a/plugins/home/src/components/VisitListener.tsx +++ b/plugins/home/src/components/VisitListener.tsx @@ -52,11 +52,11 @@ const getToEntityRef = }; /** - * @public + * @internal * This function returns an implementation of visitName which is responsible * for receiving a pathname and returning a string (name). */ -export const getVisitName = +const getVisitName = ({ rootPath = 'catalog', document = global.document } = {}) => ({ pathname }: { pathname: string }) => { // If it is a catalog entity, get the name from the path