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) {
const attributes = item.attributes;
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 (
<Pressable
@ -36,9 +36,11 @@ export function ModuleCatalogCardRenderer({
<View style={styles.textContainer}>
<Text style={styles.title}>{title}</Text>
<Text style={styles.description} numberOfLines={1}>
{label}
</Text>
{label ? (
<Text style={styles.description} numberOfLines={1}>
{label}
</Text>
) : null}
</View>
<ContentCountBadge