diff --git a/src/features/content/screens/CollectionTemplateScreen.tsx b/src/features/content/screens/CollectionTemplateScreen.tsx index 2bdb17a..5b3dd42 100644 --- a/src/features/content/screens/CollectionTemplateScreen.tsx +++ b/src/features/content/screens/CollectionTemplateScreen.tsx @@ -191,6 +191,12 @@ export function CollectionTemplateScreen({ } }} onItemPress={(item) => { + const primaryLink = item.attributes?.link; + const primaryRefs = getNavigableContentReferences(primaryLink); + if (primaryRefs.length === 1) { + router.push(buildContentReferenceRoute(primaryRefs[0]) as never); + return; + } const references = Object.values(item.attributes).flatMap((value) => getNavigableContentReferences(value), ); @@ -219,6 +225,12 @@ export function CollectionTemplateScreen({ } }} onItemPress={(item) => { + const primaryLink = item.attributes?.link; + const primaryRefs = getNavigableContentReferences(primaryLink); + if (primaryRefs.length === 1) { + router.push(buildContentReferenceRoute(primaryRefs[0]) as never); + return; + } const references = Object.values(item.attributes).flatMap((value) => getNavigableContentReferences(value), );