mg-library 1.0.450 → 1.0.452
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocks.js +8 -3
- package/package.json +1 -1
package/blocks.js
CHANGED
@@ -4,7 +4,7 @@ import { View, ActivityIndicator, Pressable, Image, FlatList, Keyboard, Dimensio
|
|
4
4
|
import { Text, Divider, Button, Popover, Card, Layout, Input } from '@ui-kitten/components';
|
5
5
|
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
6
6
|
import * as ImageManipulator from 'expo-image-manipulator';
|
7
|
-
import { Camera } from 'expo-camera';
|
7
|
+
import { Camera, CameraType } from 'expo-camera';
|
8
8
|
import axios from 'axios';
|
9
9
|
import { uploadFile } from '@uploadcare/upload-client';
|
10
10
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
@@ -310,7 +310,11 @@ export function MGCamera(props) {
|
|
310
310
|
props.process.goForward(props.nextStep);
|
311
311
|
props.dispatch(props.actions.endProcessing());
|
312
312
|
}
|
313
|
-
|
313
|
+
|
314
|
+
//const [type, setType] = useState(Camera.Constants.Type.front);
|
315
|
+
|
316
|
+
const [type, setType] = useState<CameraType>('front');
|
317
|
+
|
314
318
|
const FlipIcon = () => (
|
315
319
|
<MaterialCommunityIcons
|
316
320
|
name='camera-flip-outline'
|
@@ -339,7 +343,8 @@ export function MGCamera(props) {
|
|
339
343
|
accessoryLeft={FlipIcon}
|
340
344
|
onPress={() => {
|
341
345
|
setType(
|
342
|
-
type === Camera.Constants.Type.back ? Camera.Constants.Type.front : Camera.Constants.Type.back
|
346
|
+
// type === Camera.Constants.Type.back ? Camera.Constants.Type.front : Camera.Constants.Type.back
|
347
|
+
type === 'back' ? 'front' : 'back'
|
343
348
|
)
|
344
349
|
}}>
|
345
350
|
<Text>{mgFunctionsLib.i18nString('doInvertCamera', props.language)}</Text>
|