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:
@@ -65,7 +65,7 @@ export default function HomeScreen() {
|
|||||||
badgeText="07:00"
|
badgeText="07:00"
|
||||||
title="Aýşe metjidi"
|
title="Aýşe metjidi"
|
||||||
description="Oteldan ugraýar"
|
description="Oteldan ugraýar"
|
||||||
image={require('@/assets/images/splash-icon.png')}
|
image={require('@/assets/images/aisha.jpg')}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<PrayerTimeCard />
|
<PrayerTimeCard />
|
||||||
|
|||||||
BIN
assets/images/aisha.jpg
Normal file
BIN
assets/images/aisha.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
@@ -7,7 +7,7 @@ type FeatureCardProps = {
|
|||||||
title: string;
|
title: string;
|
||||||
description: string;
|
description: string;
|
||||||
badgeText?: string;
|
badgeText?: string;
|
||||||
image: ImageSourcePropType;
|
image?: ImageSourcePropType;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function FeatureCard({ title, description, badgeText, image }: FeatureCardProps) {
|
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.title}>{title}</Text>
|
||||||
<Text style={styles.description}>{description}</Text>
|
<Text style={styles.description}>{description}</Text>
|
||||||
</View>
|
</View>
|
||||||
<Image source={image} style={styles.image} resizeMode="cover" />
|
{image && <Image source={image} style={styles.image} resizeMode="cover" />}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user