Update HomeScreen to use a new image for the FeatureCard and modify FeatureCard component to conditionally render the image prop. This enhances flexibility in displaying feature content.

This commit is contained in:
2025-08-20 09:30:30 +05:00
parent 37aef1adc1
commit ec059535c8
3 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ type FeatureCardProps = {
title: string;
description: string;
badgeText?: string;
image: ImageSourcePropType;
image?: ImageSourcePropType;
};
export default function FeatureCard({ title, description, badgeText, image }: FeatureCardProps) {
@@ -25,7 +25,7 @@ export default function FeatureCard({ title, description, badgeText, image }: Fe
<Text style={styles.title}>{title}</Text>
<Text style={styles.description}>{description}</Text>
</View>
<Image source={image} style={styles.image} resizeMode="cover" />
{image && <Image source={image} style={styles.image} resizeMode="cover" />}
</View>
</View>
);