added camera controls component and updated camera ui

This commit is contained in:
Patrick Fic
2020-11-12 21:45:57 -08:00
parent e31f621a8f
commit 79ec14fe53
6 changed files with 203 additions and 86 deletions

View File

@@ -1,11 +1,11 @@
import { Button, Text as NBText, Thumbnail, View } from "native-base";
import React from "react";
import { SafeAreaView, Text } from "react-native";
import { FlatList, SafeAreaView, Text } from "react-native";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { removeAllPhotos } from "../../redux/photos/photos.actions";
import { selectPhotos } from "../../redux/photos/photos.selectors";
const mapStateToProps = createStructuredSelector({
photos: selectPhotos,
});
@@ -22,22 +22,19 @@ export function ScreenMediaCache({ photos, removeAllPhotos }) {
<NBText>Delete all</NBText>
</Button>
<Text>{photos.length}</Text>
<View
style={{
flex: 1,
display: "flex",
direction: "row",
backgroundColor: "tomato",
}}
>
<Text>The View</Text>
{photos.map((i, idx) => (
<FlatList
style={{ flex: 1, backgroundColor: "tomato" }}
data={photos}
keyExtractor={(item) => item.id}
renderItem={(object) => (
<View>
<Text>{i.uri}</Text>
<Thumbnail square large key={idx} source={{ uri: i.uri }} />
<Text>{object.item.uri}</Text>
<Thumbnail square large source={{ uri: object.item.uri }} />
</View>
))}
</View>
)}
//ItemSeparatorComponent={FlatListItemSeparator}
/>
</SafeAreaView>
);
}