aboutsummaryrefslogtreecommitdiff
path: root/src/screens/main/NotificationsScreen.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@thetaggid.com>2021-01-14 14:06:07 -0500
committerGitHub <noreply@github.com>2021-01-14 14:06:07 -0500
commit007dcc5c836f1b368042c530d22f5421610efb7c (patch)
tree9ea1254dcaa1c5b0ff1753a9da2c80b93be84860 /src/screens/main/NotificationsScreen.tsx
parent82476e27fe6f5dc699370659d223dcd86fd5c76b (diff)
created navigation to comment from notification (#184)
Diffstat (limited to 'src/screens/main/NotificationsScreen.tsx')
-rw-r--r--src/screens/main/NotificationsScreen.tsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/screens/main/NotificationsScreen.tsx b/src/screens/main/NotificationsScreen.tsx
index d6d47b02..8aa47299 100644
--- a/src/screens/main/NotificationsScreen.tsx
+++ b/src/screens/main/NotificationsScreen.tsx
@@ -17,6 +17,7 @@ import {NotificationType, ScreenType} from '../../types';
import {getDateAge, SCREEN_HEIGHT} from '../../utils';
const NotificationsScreen: React.FC = () => {
+ const {user: loggedInUser} = useSelector((state: RootState) => state.user);
const [refreshing, setRefreshing] = useState(false);
// used for figuring out which ones are unread
const [lastViewed, setLastViewed] = useState<moment.Moment | undefined>(
@@ -95,7 +96,13 @@ const NotificationsScreen: React.FC = () => {
}, [lastViewed, notifications]);
const renderNotification = ({item}: {item: NotificationType}) => (
- <Notification item={item} screenType={ScreenType.Notifications} />
+ <Notification
+ item={item}
+ userXId={
+ item.actor.id === loggedInUser.userId ? undefined : item.actor.id
+ }
+ screenType={ScreenType.Notifications}
+ />
);
const renderSectionHeader = ({section: {title, data}}) =>