diff options
author | Ivan Chen <ivan@thetaggid.com> | 2021-01-16 10:42:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-16 10:42:29 -0500 |
commit | 30391867438bb28cbcba9fc9ee2ff6d00027fd86 (patch) | |
tree | fe3902f4b6c33d3058145c257f7e044900120767 /src/screens/main/NotificationsScreen.tsx | |
parent | 1803da7388902db45ad37fbac509604ae632bdb5 (diff) | |
parent | 33b3bff63969e9da23722e8a70f60c5b94fe3cfb (diff) |
Merge pull request #160 from IvanIFChen/tma479-moment-thumbnails
[TMA-479] Moment Thumbnails
Diffstat (limited to 'src/screens/main/NotificationsScreen.tsx')
-rw-r--r-- | src/screens/main/NotificationsScreen.tsx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/screens/main/NotificationsScreen.tsx b/src/screens/main/NotificationsScreen.tsx index 8aa47299..219a0be9 100644 --- a/src/screens/main/NotificationsScreen.tsx +++ b/src/screens/main/NotificationsScreen.tsx @@ -18,6 +18,9 @@ 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>( @@ -98,10 +101,8 @@ const NotificationsScreen: React.FC = () => { const renderNotification = ({item}: {item: NotificationType}) => ( <Notification item={item} - userXId={ - item.actor.id === loggedInUser.userId ? undefined : item.actor.id - } screenType={ScreenType.Notifications} + moments={item.notification_type === 'CMT' ? loggedInUserMoments : []} /> ); @@ -134,7 +135,7 @@ const NotificationsScreen: React.FC = () => { const styles = StyleSheet.create({ header: { - marginLeft: '5%', + marginLeft: '8%', marginTop: '5%', alignSelf: 'flex-start', flexDirection: 'column', @@ -156,10 +157,10 @@ const styles = StyleSheet.create({ backgroundColor: '#f3f2f2', }, sectionHeader: { - marginLeft: '5%', + marginLeft: '8%', marginTop: '5%', marginBottom: '2%', - fontSize: 16, + fontSize: 15, }, }); |