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

@@ -65,7 +65,7 @@ export default function HomeScreen() {
badgeText="07:00"
title="Aýşe metjidi"
description="Oteldan ugraýar"
image={require('@/assets/images/splash-icon.png')}
image={require('@/assets/images/aisha.jpg')}
/>
<PrayerTimeCard />

BIN
assets/images/aisha.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

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>
);