Skip to content

Commit 10b5d9e

Browse files
committed
remover nombre cuando es redundante
1 parent 8e4d584 commit 10b5d9e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/components/shared/Card.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ const styles = StyleSheet.create({
3838
});
3939

4040
export function Card({ name, children, onPress, src }) {
41+
const show = () => {
42+
if (
43+
name === 'IMPORTANCIA DE ASOC. DE SORDOS' ||
44+
name === '¿POR QUÉ ES IMPORTANTE LA CPCD?'
45+
)
46+
return false;
47+
else return true;
48+
};
49+
4150
const imagePaddingHorizontal = getCardPadding() * 2;
4251
const imagePaddingVertical = getCardPadding() * 2;
4352

@@ -86,7 +95,7 @@ export function Card({ name, children, onPress, src }) {
8695
},
8796
]}
8897
>
89-
<Text style={styles.name}>{name}</Text>
98+
{show() && <Text style={styles.name}>{name}</Text>}
9099
</View>
91100
</TouchableOpacity>
92101
);

0 commit comments

Comments
 (0)