From 390bb6dfa62d19aa55e46c98434a5ea72a310c26 Mon Sep 17 00:00:00 2001 From: zeppi Date: Sat, 16 Oct 2021 01:26:40 -0400 Subject: [PATCH] fix repost list empty --- static/app-strings.json | 2 ++ ui/component/claimList/view.jsx | 12 ++++++++++-- ui/page/fileListPublished/view.jsx | 29 ++++++++++++++++++----------- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/static/app-strings.json b/static/app-strings.json index 5373770c1..330b207c8 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -2184,5 +2184,7 @@ "From comments": "From comments", "From search": "From search", "Manage tags": "Manage tags", + "No Reposts": "No Reposts", + "You haven't reposted anything yet. Do it.": "You haven't reposted anything yet. Do it.", "--end--": "--end--" } diff --git a/ui/component/claimList/view.jsx b/ui/component/claimList/view.jsx index bdfd5450a..456c23e0f 100644 --- a/ui/component/claimList/view.jsx +++ b/ui/component/claimList/view.jsx @@ -44,6 +44,7 @@ type Props = { collectionId?: string, showNoSourceClaims?: boolean, onClick?: (e: any, claim?: ?Claim, index?: number) => void, + noEmpty: boolean, }; export default function ClaimList(props: Props) { @@ -74,8 +75,11 @@ export default function ClaimList(props: Props) { collectionId, showNoSourceClaims, onClick, + noEmpty, } = props; + console.log('noempty', noEmpty); + const [currentSort, setCurrentSort] = usePersistedState(persistedStorageKey, SORT_NEW); // Exclude prefix uris in these results variables. We don't want to show @@ -134,7 +138,9 @@ export default function ClaimList(props: Props) { showNoSourceClaims={showNoSourceClaims} /> ))} - {!timedOut && urisLength === 0 && !loading &&
{empty || noResultMsg}
} + {!timedOut && urisLength === 0 && !loading && !noEmpty && ( +
{empty || noResultMsg}
+ )} {timedOut && timedOutMessage &&
{timedOutMessage}
} ) : ( @@ -208,7 +214,9 @@ export default function ClaimList(props: Props) { )} - {!timedOut && urisLength === 0 && !loading &&
{empty || noResultMsg}
} + {!timedOut && urisLength === 0 && !loading && !noEmpty && ( +
{empty || noResultMsg}
+ )} {!loading && timedOut && timedOutMessage &&
{timedOutMessage}
} ); diff --git a/ui/page/fileListPublished/view.jsx b/ui/page/fileListPublished/view.jsx index c87ea8634..6a8ed458d 100644 --- a/ui/page/fileListPublished/view.jsx +++ b/ui/page/fileListPublished/view.jsx @@ -65,9 +65,10 @@ function FileListPublished(props: Props) {
- {!!(urls && urls.length) && ( + {!!urls && ( <>
+ filterBy !== FILTER_REPOSTS && ( +
+
+ ) } />