Little fix of parameters for image selection
This commit is contained in:
@@ -22,7 +22,7 @@ import {
|
||||
|
||||
import { ChevronDownIcon } from "@/components/ui/icon";
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import {createNotice, uploadImage} from "@/api/notices";
|
||||
import {createNotice} from "@/api/notices";
|
||||
|
||||
export default function CreateNotice() {
|
||||
const [title, setTitle] = useState("");
|
||||
@@ -65,7 +65,7 @@ export default function CreateNotice() {
|
||||
console.log("Notice created successfully");
|
||||
},
|
||||
onError: (error) => {
|
||||
console.error("Error creating notice");
|
||||
console.error("Error creating notice. Erroe message: ", error.message);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -87,10 +87,12 @@ export default function CreateNotice() {
|
||||
const pickImage = async () => {
|
||||
// No permissions request is necessary for launching the image library
|
||||
let result = await ImagePicker.launchImageLibraryAsync({
|
||||
mediaTypes: ['images', 'videos'],
|
||||
allowsEditing: true,
|
||||
mediaTypes: ['images'],
|
||||
selectionLimit: 8,
|
||||
allowsEditing: false,
|
||||
allowsMultipleSelection: true,
|
||||
aspect: [4, 3],
|
||||
quality: 1,
|
||||
quality: 0.5,
|
||||
});
|
||||
|
||||
if (!result.canceled) {
|
||||
|
||||
Reference in New Issue
Block a user