From 21c7b59de3811dd05d47446412958b0fc3db4bfd Mon Sep 17 00:00:00 2001 From: George Rusu Date: Fri, 11 Jun 2021 09:44:19 -0700 Subject: Replace index k with new unique key --- src/screens/main/NotificationsScreen.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/screens/main/NotificationsScreen.tsx b/src/screens/main/NotificationsScreen.tsx index ebcccc8e..7592a565 100644 --- a/src/screens/main/NotificationsScreen.tsx +++ b/src/screens/main/NotificationsScreen.tsx @@ -290,7 +290,9 @@ const NotificationsScreen: React.FC = () => { contentContainerStyle={styles.container} stickySectionHeadersEnabled={false} sections={sectionedNotifications} - keyExtractor={(_item, index) => index.toString()} + keyExtractor={(item, index) => + item.timestamp.toString() + index.toString() + } renderItem={renderNotification} renderSectionHeader={renderSectionHeader} renderSectionFooter={renderSectionFooter} -- cgit v1.2.3-70-g09d2 From 2fde5947258a702f6ee51b436f00aa3be5d7c2b2 Mon Sep 17 00:00:00 2001 From: George Rusu Date: Fri, 11 Jun 2021 09:45:35 -0700 Subject: Organize imports --- src/screens/main/NotificationsScreen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/screens/main/NotificationsScreen.tsx b/src/screens/main/NotificationsScreen.tsx index 7592a565..03842b0a 100644 --- a/src/screens/main/NotificationsScreen.tsx +++ b/src/screens/main/NotificationsScreen.tsx @@ -19,6 +19,7 @@ import {SafeAreaView} from 'react-native-safe-area-context'; import {useDispatch, useSelector} from 'react-redux'; import FindFriendsBlueIcon from '../../assets/icons/findFriends/find-friends-blue-icon.svg'; import {TabsGradient} from '../../components'; +import EmptyContentView from '../../components/common/EmptyContentView'; import {Notification} from '../../components/notifications'; import {NewChatPrompt} from '../../components/notifications/NotificationPrompts'; import { @@ -28,7 +29,6 @@ import { import {RootState} from '../../store/rootReducer'; import {NotificationType, ScreenType} from '../../types'; import {getDateAge, normalize, SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; -import EmptyContentView from '../../components/common/EmptyContentView'; const NotificationsScreen: React.FC = () => { const {newNotificationReceived} = useSelector( -- cgit v1.2.3-70-g09d2