Package updates & minor fixes.
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
import { useNavigation } from "@react-navigation/native";
|
||||
import * as ImagePicker from "expo-image-picker";
|
||||
import { Body, H3, Icon, ListItem, Right } from "native-base";
|
||||
import React, { useEffect } from "react";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Animated, Platform, Text } from "react-native";
|
||||
import { Animated, Text } from "react-native";
|
||||
import { TouchableOpacity } from "react-native-gesture-handler";
|
||||
import Swipeable from "react-native-gesture-handler/Swipeable";
|
||||
import { connect } from "react-redux";
|
||||
@@ -24,33 +23,33 @@ export function JobListItem({ setCameraJob, setCameraJobId, item }) {
|
||||
const { t } = useTranslation();
|
||||
const navigation = useNavigation();
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
if (Platform.OS !== "web") {
|
||||
const {
|
||||
status,
|
||||
} = await ImagePicker.requestMediaLibraryPermissionsAsync();
|
||||
if (status !== "granted") {
|
||||
alert("Sorry, we need camera roll permissions to make this work!");
|
||||
}
|
||||
}
|
||||
})();
|
||||
}, []);
|
||||
// useEffect(() => {
|
||||
// (async () => {
|
||||
// if (Platform.OS !== "web") {
|
||||
// const {
|
||||
// status,
|
||||
// } = await ImagePicker.requestMediaLibraryPermissionsAsync();
|
||||
// if (status !== "granted") {
|
||||
// alert("Sorry, we need camera roll permissions to make this work!");
|
||||
// }
|
||||
// }
|
||||
// })();
|
||||
// }, []);
|
||||
|
||||
const pickImage = async () => {
|
||||
let result = await ImagePicker.launchImageLibraryAsync({
|
||||
mediaTypes: ImagePicker.MediaTypeOptions.All,
|
||||
allowsEditing: true,
|
||||
aspect: [4, 3],
|
||||
quality: 1,
|
||||
});
|
||||
// const pickImage = async () => {
|
||||
// let result = await ImagePicker.launchImageLibraryAsync({
|
||||
// mediaTypes: ImagePicker.MediaTypeOptions.All,
|
||||
// allowsEditing: true,
|
||||
// aspect: [4, 3],
|
||||
// quality: 1,
|
||||
// });
|
||||
|
||||
console.log(result);
|
||||
// console.log(result);
|
||||
|
||||
if (!result.cancelled) {
|
||||
// setImage(result.uri);
|
||||
}
|
||||
};
|
||||
// if (!result.cancelled) {
|
||||
// // setImage(result.uri);
|
||||
// }
|
||||
// };
|
||||
|
||||
const RenderRightAction = (progress, dragX) => {
|
||||
const scale = dragX.interpolate({
|
||||
|
||||
Reference in New Issue
Block a user