fix: image not shown
This commit is contained in:
parent
62e71d1b49
commit
a51dee6795
2 changed files with 3 additions and 3 deletions
|
|
@ -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>
|
||||
);
|
||||
|
|
|
|||
Reference in a new issue