dismiss bottomSheet before opening the camera
This commit is contained in:
parent
4c389a49fa
commit
13464cb06b
1 changed files with 4 additions and 4 deletions
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Reference in a new issue