use runInAction in getPhotos model
This commit is contained in:
parent
3b899bfc66
commit
1f16c75121
2 changed files with 9 additions and 12 deletions
|
@ -2,14 +2,9 @@ import React from 'react'
|
|||
import {Image, StyleSheet, TouchableOpacity, ScrollView} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {
|
||||
openPicker,
|
||||
openCamera,
|
||||
ImageOrVideo,
|
||||
} from 'react-native-image-crop-picker'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {openPicker, openCamera} from 'react-native-image-crop-picker'
|
||||
|
||||
export const PhotoCarouselPicker = observer(function PhotoCarouselPicker({
|
||||
export const PhotoCarouselPicker = ({
|
||||
selectedPhotos,
|
||||
setSelectedPhotos,
|
||||
localPhotos,
|
||||
|
@ -17,7 +12,7 @@ export const PhotoCarouselPicker = observer(function PhotoCarouselPicker({
|
|||
selectedPhotos: string[]
|
||||
setSelectedPhotos: React.Dispatch<React.SetStateAction<string[]>>
|
||||
localPhotos: any
|
||||
}) {
|
||||
}) => {
|
||||
return (
|
||||
<ScrollView
|
||||
horizontal
|
||||
|
@ -65,7 +60,7 @@ export const PhotoCarouselPicker = observer(function PhotoCarouselPicker({
|
|||
</TouchableOpacity>
|
||||
</ScrollView>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
photosContainer: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue