From 246e361733ed165bb7abbffb564501a4b9abda8d Mon Sep 17 00:00:00 2001 From: Nouman Tahir Date: Thu, 2 Mar 2023 18:44:49 +0500 Subject: [PATCH] setting post screen key on navigation --- src/components/comments/container/commentsContainer.tsx | 1 + src/components/postCard/children/postCardContent.tsx | 3 ++- src/screens/post/screen/postScreen.tsx | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/comments/container/commentsContainer.tsx b/src/components/comments/container/commentsContainer.tsx index 344fab0bf..70b416914 100644 --- a/src/components/comments/container/commentsContainer.tsx +++ b/src/components/comments/container/commentsContainer.tsx @@ -254,6 +254,7 @@ const CommentsContainer = ({ author: comment.author, permlink: comment.permlink, }, + key: `${comment.author}/${comment.permlink}` }); }; diff --git a/src/components/postCard/children/postCardContent.tsx b/src/components/postCard/children/postCardContent.tsx index 38c3d090c..5c61488d9 100644 --- a/src/components/postCard/children/postCardContent.tsx +++ b/src/components/postCard/children/postCardContent.tsx @@ -44,7 +44,8 @@ export const PostCardContent = ({ content, isHideImage, thumbHeight, nsfw, setTh content: content, author: content.author, permlink: content.permlink, - } + }, + key: `${content.author}/${content.permlink}` }) } diff --git a/src/screens/post/screen/postScreen.tsx b/src/screens/post/screen/postScreen.tsx index d950ee8cb..e773f82ee 100644 --- a/src/screens/post/screen/postScreen.tsx +++ b/src/screens/post/screen/postScreen.tsx @@ -1,4 +1,4 @@ -import React, { useState, useRef, useEffect, useMemo } from 'react'; +import React, { useState, useRef, useEffect } from 'react'; import { View } from 'react-native'; // Components