Merge pull request 'remove open content fallback description from catalog card' (#68) from fix-remove-open-content into main

Reviewed-on: https://10.10.0.4/AcuPedia/acupedia-mobile-ui/pulls/68
Reviewed-by: Amit Salunke <amit@noreply.localhost>
This commit is contained in:
Amit Salunke 2026-10-20 04:45:07 +00:00
commit abcb9823c2
1 changed files with 6 additions and 4 deletions

View File

@ -22,7 +22,7 @@ export function ModuleCatalogCardRenderer({
}: CollectionItemRendererProps) { }: CollectionItemRendererProps) {
const attributes = item.attributes; const attributes = item.attributes;
const title = asString(attributes.name) || item.title; const title = asString(attributes.name) || item.title;
const label = asString(attributes.content_label) || item.summary || "Open content"; const label = asString(attributes.content_label) || item.summary || null;
return ( return (
<Pressable <Pressable
@ -36,9 +36,11 @@ export function ModuleCatalogCardRenderer({
<View style={styles.textContainer}> <View style={styles.textContainer}>
<Text style={styles.title}>{title}</Text> <Text style={styles.title}>{title}</Text>
<Text style={styles.description} numberOfLines={1}> {label ? (
{label} <Text style={styles.description} numberOfLines={1}>
</Text> {label}
</Text>
) : null}
</View> </View>
<ContentCountBadge <ContentCountBadge