Fix: image was rendering inside buttons view

This commit is contained in:
Filip Rojek 2024-05-12 21:58:18 +02:00
parent b6b9b989c7
commit 4fe4808b3c

View File

@ -162,18 +162,12 @@ export default function BeerAdd() {
textStyle={styles.imageTextButton} textStyle={styles.imageTextButton}
/> />
{Platform.OS != "web" ? ( <Button
<Button onPress={openCamera}
onPress={openCamera} title="Open camera"
title={"Open camera"} buttonStyle={styles.imageButton}
buttonStyle={styles.imageButton} textStyle={styles.imageTextButton}
textStyle={styles.imageTextButton} />
/>
) : (
false
)}
{image && <Image source={{ uri: image }} style={styles.image} />}
</View> </View>
{image && <Image source={{ uri: image }} style={styles.image} />} {image && <Image source={{ uri: image }} style={styles.image} />}
<Button title="Add beer" color={colors.gold} onPress={addBeer} /> <Button title="Add beer" color={colors.gold} onPress={addBeer} />