dismiss bottomSheet before opening the camera

This commit is contained in:
Elias Nahum 2022-09-18 06:59:56 -04:00
parent 4c389a49fa
commit 13464cb06b
No known key found for this signature in database
GPG key ID: E038DB71E0B61702

View file

@ -57,26 +57,26 @@ const CameraType = ({onPress}: Props) => {
const isTablet = useIsTablet();
const style = getStyle(theme);
const onPhoto = () => {
const onPhoto = async () => {
const options: CameraOptions = {
quality: 0.8,
mediaType: 'photo',
saveToPhotos: true,
};
await dismissBottomSheet();
onPress(options);
dismissBottomSheet();
};
const onVideo = () => {
const onVideo = async () => {
const options: CameraOptions = {
videoQuality: 'high',
mediaType: 'video',
saveToPhotos: true,
};
await dismissBottomSheet();
onPress(options);
dismissBottomSheet();
};
return (