From 8b60e0f12ffdfabb7ef71e24f1035d10e48278d2 Mon Sep 17 00:00:00 2001 From: ShivaniKhaire Date: Fri, 23 Oct 2026 09:46:13 +0530 Subject: [PATCH] fix(renderers): exclude point_codes and source_point from generic link sections --- .../shared/ContentLinkAttributeSections.tsx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/features/content/renderers/shared/ContentLinkAttributeSections.tsx b/src/features/content/renderers/shared/ContentLinkAttributeSections.tsx index c287699..65e8757 100644 --- a/src/features/content/renderers/shared/ContentLinkAttributeSections.tsx +++ b/src/features/content/renderers/shared/ContentLinkAttributeSections.tsx @@ -29,6 +29,12 @@ function containsNavigableReference(value: unknown): boolean { return false; } +const DEFAULT_EXCLUDED_KEYS = new Set([ + "point_codes", + "source_point", + "source_points", +]); + export function ContentLinkAttributeSections({ data, definitions = [], @@ -40,10 +46,13 @@ export function ContentLinkAttributeSections({ [presentationAttributes], ); - const excluded = useMemo( - () => new Set(excludeAttributeKeys.map((key) => bareAttributeKey(key))), - [excludeAttributeKeys], - ); + const excluded = useMemo(() => { + const set = new Set(DEFAULT_EXCLUDED_KEYS); + for (const key of excludeAttributeKeys) { + set.add(bareAttributeKey(key)); + } + return set; + }, [excludeAttributeKeys]); const items = useMemo(() => { const roots = [...definitions]