diff options
author | Ashm Walia <40498934+ashmgarv@users.noreply.github.com> | 2021-01-16 09:51:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-16 09:51:36 -0800 |
commit | 9711093bfa5810868e3cd17008bb7b3ddc7b9034 (patch) | |
tree | 6a8bb4341b1623cfc2da86af4b3b28c1fd3f8a44 /src/screens/main/NotificationsScreen.tsx | |
parent | d85eaeb878cbbeedda860ee5809b81100c910af2 (diff) | |
parent | 30391867438bb28cbcba9fc9ee2ff6d00027fd86 (diff) |
Merge branch 'master' into tma538-friend-requests
Diffstat (limited to 'src/screens/main/NotificationsScreen.tsx')
-rw-r--r-- | src/screens/main/NotificationsScreen.tsx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/screens/main/NotificationsScreen.tsx b/src/screens/main/NotificationsScreen.tsx index d6d47b02..219a0be9 100644 --- a/src/screens/main/NotificationsScreen.tsx +++ b/src/screens/main/NotificationsScreen.tsx @@ -17,6 +17,10 @@ import {NotificationType, ScreenType} from '../../types'; import {getDateAge, SCREEN_HEIGHT} from '../../utils'; const NotificationsScreen: React.FC = () => { + const {user: loggedInUser} = useSelector((state: RootState) => state.user); + const {moments: loggedInUserMoments} = useSelector( + (state: RootState) => state.moments, + ); const [refreshing, setRefreshing] = useState(false); // used for figuring out which ones are unread const [lastViewed, setLastViewed] = useState<moment.Moment | undefined>( @@ -95,7 +99,11 @@ const NotificationsScreen: React.FC = () => { }, [lastViewed, notifications]); const renderNotification = ({item}: {item: NotificationType}) => ( - <Notification item={item} screenType={ScreenType.Notifications} /> + <Notification + item={item} + screenType={ScreenType.Notifications} + moments={item.notification_type === 'CMT' ? loggedInUserMoments : []} + /> ); const renderSectionHeader = ({section: {title, data}}) => @@ -127,7 +135,7 @@ const NotificationsScreen: React.FC = () => { const styles = StyleSheet.create({ header: { - marginLeft: '5%', + marginLeft: '8%', marginTop: '5%', alignSelf: 'flex-start', flexDirection: 'column', @@ -149,10 +157,10 @@ const styles = StyleSheet.create({ backgroundColor: '#f3f2f2', }, sectionHeader: { - marginLeft: '5%', + marginLeft: '8%', marginTop: '5%', marginBottom: '2%', - fontSize: 16, + fontSize: 15, }, }); |