about summary refs log tree commit diff
path: root/src/view/com/lists
diff options
context:
space:
mode:
authorAnsh <anshnanda10@gmail.com>2023-12-05 20:27:38 -0600
committerGitHub <noreply@github.com>2023-12-05 18:27:38 -0800
commit78e459d06fbc48459dd73c9e837278eac254f4a9 (patch)
tree00856585cbc2e00736672ab18d0783f9bf2af89a /src/view/com/lists
parente6bda92b206de0d839c4e134d25fc7f56ae9c767 (diff)
downloadvoidsky-78e459d06fbc48459dd73c9e837278eac254f4a9.tar.zst
Add missing translations and fix react key error in `MyLists.tsx` (#2103)
* add missing translations

* fix key errors in MyLists

* Update UserAddRemoveLists.tsx
Diffstat (limited to 'src/view/com/lists')
-rw-r--r--src/view/com/lists/MyLists.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/view/com/lists/MyLists.tsx b/src/view/com/lists/MyLists.tsx
index 2c080582e..b46d34ba5 100644
--- a/src/view/com/lists/MyLists.tsx
+++ b/src/view/com/lists/MyLists.tsx
@@ -82,6 +82,7 @@ export function MyLists({
       if (item === EMPTY) {
         return (
           <View
+            key={item._reactKey}
             testID="listsEmpty"
             style={[{padding: 18, borderTopWidth: 1}, pal.border]}>
             <Text style={pal.textLight}>
@@ -92,13 +93,14 @@ export function MyLists({
       } else if (item === ERROR_ITEM) {
         return (
           <ErrorMessage
+            key={item._reactKey}
             message={cleanError(error)}
             onPressTryAgain={onRefresh}
           />
         )
       } else if (item === LOADING) {
         return (
-          <View style={{padding: 20}}>
+          <View key={item._reactKey} style={{padding: 20}}>
             <ActivityIndicator />
           </View>
         )
@@ -107,6 +109,7 @@ export function MyLists({
         renderItem(item, index)
       ) : (
         <ListCard
+          key={item.uri}
           list={item}
           testID={`list-${item.name}`}
           style={styles.item}
@@ -123,7 +126,7 @@ export function MyLists({
         <FlatListCom
           testID={testID ? `${testID}-flatlist` : undefined}
           data={items}
-          keyExtractor={(item: any) => item._reactKey}
+          keyExtractor={item => (item.uri ? item.uri : item._reactKey)}
           renderItem={renderItemInner}
           refreshControl={
             <RefreshControl