From 1b7fef188ec2aee0706fc1204432315db3d4fec6 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh <37447613+shravyaramesh@users.noreply.github.com> Date: Mon, 19 Oct 2020 12:42:15 -0700 Subject: Tma235/231 Individual view and horizontal view (#59) * Implemented modal stack navigation for moment view, created a rough UI for individual moment view [incl: title, image(not displayed)] * bare bones beginnning * Created individual moment screen, moment tile for horizontal view * Alert * Fix initial route Co-authored-by: Ashm Walia Co-authored-by: Ashm Walia <40498934+ashmgarv@users.noreply.github.com> --- src/components/profile/MomentTile.tsx | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/components/profile/MomentTile.tsx (limited to 'src/components/profile/MomentTile.tsx') diff --git a/src/components/profile/MomentTile.tsx b/src/components/profile/MomentTile.tsx new file mode 100644 index 00000000..70b20d40 --- /dev/null +++ b/src/components/profile/MomentTile.tsx @@ -0,0 +1,33 @@ +import {useNavigation} from '@react-navigation/native'; +import React from 'react'; +import {StyleSheet, View, Image, TouchableOpacity} from 'react-native'; +import {MomentType} from 'src/types'; + +interface MomentTileProps { + moment: MomentType; +} +const MomentTile: React.FC = ({moment}) => { + const navigation = useNavigation(); + const {path_hash} = moment; + return ( + { + navigation.navigate('IndividualMoment', {moment}); + }}> + + + + + ); +}; + +const styles = StyleSheet.create({ + image: { + aspectRatio: 1, + height: '100%', + alignItems: 'center', + justifyContent: 'center', + flexDirection: 'column', + }, +}); +export default MomentTile; -- cgit v1.2.3-70-g09d2