From 72f5b608718aac7754be4a983ce10e0b8b741ae0 Mon Sep 17 00:00:00 2001 From: Sebastian-Webster <84299475+Sebastian-Webster@users.noreply.github.com> Date: Thu, 15 Feb 2024 17:06:50 +1300 Subject: [PATCH] fix: CategoryViewPage now shows image preview --- screens/CategoryCreationPage.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/screens/CategoryCreationPage.js b/screens/CategoryCreationPage.js index b44efdc..44db4d7 100644 --- a/screens/CategoryCreationPage.js +++ b/screens/CategoryCreationPage.js @@ -86,15 +86,14 @@ const CategoryCreationPage = ({navigation, route}) => { const pickImage = async () => { let result = await ImagePicker.launchImageLibraryAsync({ - mediaTypes: ImagePicker.MediaTypeOptions.All, + mediaTypes: ImagePicker.MediaTypeOptions.Images, allowsEditing: true, aspect: [1,1], quality: 1, }); if (!result.canceled) { - console.log(result) - navigation.setParams({imageFromRoute: result}) + navigation.setParams({imageFromRoute: result.assets[0]}) } else { console.log("Cancelled") }