In this code, I want to receive several different photos in each state But only the first photo is replaced and it does not work for other photos.
const pickMultiple = (e) => {
ImagePicker.openPicker({
cropping: true,
width: 300,
height: 400
})
.then((image) => {
switch (e) {
case 'Hstore':
return setBanner(image.path);
break
case 'HstoreM':
return setBannerMobile(image.path);
break
case 'Bstore':
return setBannerStore(image.path);
case 'Bstore2':
return setBannerStore(image.path);
case 'Pop':
return setPop(image.path);
default:
return null
}
})
.catch((e) => console.log(e));
};