Skip to content

Commit

Permalink
fix: CategoryViewPage now shows image preview
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Webster committed Feb 15, 2024
1 parent ff5876a commit 72f5b60
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions screens/CategoryCreationPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 72f5b60

Please sign in to comment.