fix: image not shown

This commit is contained in:
Jakob Stornig 2024-01-02 14:50:42 +01:00
parent 62e71d1b49
commit a51dee6795
2 changed files with 3 additions and 3 deletions

View file

@ -6,7 +6,7 @@ interface WidgetProps {
title?: string;
text?: string;
children?: ReactNode;
image?: string;
image?: any;
}
const Widget: React.FC<WidgetProps> = ({ title, text, children, image }) => { // Add the 'image' prop to the destructuring
@ -54,7 +54,7 @@ const Widget: React.FC<WidgetProps> = ({ title, text, children, image }) => { //
<View style={styles.widgetContainer}>
{!!title && <Text style={styles.widgetTitle}>{title}</Text>}
{!!text && <Text style={styles.widgetText}>{text}</Text>}
{!!image && <Image source={{ uri: image }} style={styles.imageStyle} />}
{!!image && <Image source={image} style={styles.imageStyle} />}
{children}
</View>
);