tutorial-photo-gallery-react
tutorial-photo-gallery-react copied to clipboard
Have to use try catch block when calling takePhoto function
When a user opens camera but closes it by the top left X button, it throws Error: User cancelled photos app
and crashes the PWA app.
This takePhoto function have to use a try catch.
https://github.com/ionic-team/tutorial-photo-gallery-react/blob/b02f8eca21ead4e704226af97384e67b60f47806/src/hooks/usePhotoGallery.ts#L36