From e38a3eaa6c853f13f5bbb1476fcab3ee1fd974bd Mon Sep 17 00:00:00 2001
From: Ashm Walia <40498934+ashmgarv@users.noreply.github.com>
Date: Tue, 5 Jan 2021 12:58:20 -0800
Subject: Done (#163)
---
src/assets/icons/grey-plus-logo.svg | 1 +
src/components/moments/Moment.tsx | 8 ++++++-
src/components/profile/Content.tsx | 46 ++++++++++++++++++++++++++++---------
3 files changed, 43 insertions(+), 12 deletions(-)
create mode 100644 src/assets/icons/grey-plus-logo.svg
(limited to 'src')
diff --git a/src/assets/icons/grey-plus-logo.svg b/src/assets/icons/grey-plus-logo.svg
new file mode 100644
index 00000000..3d2e1a36
--- /dev/null
+++ b/src/assets/icons/grey-plus-logo.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/moments/Moment.tsx b/src/components/moments/Moment.tsx
index 7010a595..0d2c2b62 100644
--- a/src/components/moments/Moment.tsx
+++ b/src/components/moments/Moment.tsx
@@ -34,7 +34,13 @@ const Moment: React.FC = ({
const navigateToImagePicker = () => {
ImagePicker.openPicker({
- smartAlbums: ['Favorites', 'RecentlyAdded', 'SelfPortraits', 'Screenshots', 'UserLibrary'],
+ smartAlbums: [
+ 'Favorites',
+ 'RecentlyAdded',
+ 'SelfPortraits',
+ 'Screenshots',
+ 'UserLibrary',
+ ],
width: 580,
height: 580,
cropping: true,
diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx
index 60f18cc2..3a304938 100644
--- a/src/components/profile/Content.tsx
+++ b/src/components/profile/Content.tsx
@@ -50,6 +50,7 @@ import {
import {Cover} from '.';
import {TouchableOpacity} from 'react-native-gesture-handler';
import {useNavigation} from '@react-navigation/native';
+import GreyPlusLogo from '../../assets/icons/grey-plus-logo.svg';
interface ContentProps {
y: Animated.Value;
@@ -295,17 +296,28 @@ const Content: React.FC = ({y, userXId, screenType}) => {
/>
- {userMomentCategories.map((title, index) => (
- 2}
- />
- ))}
+ {userXId && moments.length === 0 && (
+
+
+ {`Looks like ${
+ profile.name.split(' ')[0]
+ } has not posted any moments yet`}
+
+ )}
+ {userMomentCategories.map(
+ (title, index) =>
+ (!userXId || imagesMap.get(title)) && (
+ 2}
+ />
+ ),
+ )}
{!userXId && userMomentCategories.length < 6 && (
@@ -350,6 +362,18 @@ const styles = StyleSheet.create({
fontWeight: '500',
color: 'white',
},
+ plusIconContainer: {
+ flexDirection: 'column',
+ justifyContent: 'center',
+ alignItems: 'center',
+ marginVertical: '10%',
+ },
+ noMomentsText: {
+ fontSize: 14,
+ fontWeight: 'bold',
+ color: 'gray',
+ marginVertical: '8%',
+ },
});
export default Content;
--
cgit v1.2.3-70-g09d2