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:
commit
abcb9823c2
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue