-
Notifications
You must be signed in to change notification settings - Fork 1
image_reducer
Anoop Nair edited this page Nov 15, 2021
·
2 revisions
This file contains all the redux reducers for images. Immer is used to handle immutable state.
- Map through
action.payload.images
- If
action.payload.type
isCAMERA || GALLERY
the shape of image object is same
id:
lat:
lon:
uri:
filename:
date:
type: --> CAMERA || GALLERY || WEB
selected:
tags:
pickedUp:
- If type is
WEB
- check if image with same photoId already exist in state, if not add it to images array.
- the shape of image object is different.
WEB
images don't have lat/long properties but they are geotagged because web app only accepts geotagged images.
id:
uri:
filename:
type: --> CAMERA || GALLERY || WEB
selected:
tags:
pickedUp:
photoId: --> Id of image uploaded from web
-
Init
-
Navigation Stacks