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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user