From 7ee0732eaa58eb022cf9662c25bad86a26d3b25b Mon Sep 17 00:00:00 2001 From: Ryan Albrecht Date: Sun, 19 Jul 2026 19:55:17 +0000 Subject: [PATCH] fix(coding-conventions): Move Wrapper component to module scope in recursiveStructuredData --- .../recursiveStructuredData.tsx | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/static/app/components/structuredEventData/recursiveStructuredData.tsx b/static/app/components/structuredEventData/recursiveStructuredData.tsx index 89ae29dcee78..d55749cad264 100644 --- a/static/app/components/structuredEventData/recursiveStructuredData.tsx +++ b/static/app/components/structuredEventData/recursiveStructuredData.tsx @@ -37,6 +37,21 @@ function getTotalChildrenFromMeta(m: Record | undefined): number | und return typeof rootMeta?.len === 'number' ? rootMeta.len : undefined; } +function Wrapper({ + objectKey, + children, +}: { + children: React.ReactNode; + objectKey: React.ReactNode; +}) { + return ( + + {objectKey} + {children} + + ); +} + export function RecursiveStructuredData({ config, meta, @@ -57,20 +72,11 @@ export function RecursiveStructuredData({ ); - function Wrapper({children}: {children: React.ReactNode}) { - return ( - - {formattedObjectKey} - {children} - - ); - } - if (config?.isNull?.(value) || value === null) { const nullValue = config?.renderNull?.(value) ?? String(value); return ( - + + + + {'"'} + + +