Skip to content

Commit c4e7375

Browse files
committed
fix(web): render URL arrays without Badge wrapper for proper normalization
URLs in primitive arrays (like Lineage field) were wrapped in Badge components which prevented the lowercase URL text from rendering correctly. Now URL arrays render without Badge wrapping to preserve Anchor link formatting.
1 parent cba86d6 commit c4e7375

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

apps/web/src/components/EntityDataDisplay.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,25 @@ const renderValueContent = (value: unknown, fieldName?: string): import("react")
278278
return null;
279279
}
280280

281-
// Primitive arrays - inline badges
281+
// Primitive arrays - handle inline or as links depending on content
282282
if (value.every(item => typeof item !== "object" || item === null)) {
283+
// Check if any items are URLs that need special rendering
284+
const hasUrls = value.some(item =>
285+
typeof item === "string" && /^https?:\/\//i.test(item)
286+
);
287+
288+
if (hasUrls) {
289+
// URLs need individual rendering for proper link handling
290+
return (
291+
<Group wrap="wrap" gap={4}>
292+
{value.map((item, index) => (
293+
<Box key={index}>{renderPrimitiveValue(item)}</Box>
294+
))}
295+
</Group>
296+
);
297+
}
298+
299+
// Non-URL primitives render as badges
283300
return (
284301
<Group wrap="wrap" gap={4}>
285302
{value.map((item, index) => (

0 commit comments

Comments
 (0)