From f8222326420ed33183544bdc39d2d450660761d4 Mon Sep 17 00:00:00 2001 From: Franco Montenegro Date: Tue, 30 Aug 2022 17:38:10 -0300 Subject: [PATCH] Add censor reason if available. --- flow-typed/Claim.js | 1 + ui/page/show/view.jsx | 4 +++- ui/redux/actions/claims.js | 8 +++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/flow-typed/Claim.js b/flow-typed/Claim.js index 4c3a63150..08e3190a9 100644 --- a/flow-typed/Claim.js +++ b/flow-typed/Claim.js @@ -167,6 +167,7 @@ declare type ClaimErrorCensor = { take_over_height: number, }, name: string, + text: string, normalized_name: string, nout: number, permanent_url: string, diff --git a/ui/page/show/view.jsx b/ui/page/show/view.jsx index 6618c2b88..57389e938 100644 --- a/ui/page/show/view.jsx +++ b/ui/page/show/view.jsx @@ -165,7 +165,9 @@ function ShowPage(props: Props) { title={uri} subtitle={ <> - {__('Your hub has blocked this content because it subscribes to the following blocking channel:')}{' '} + {(!errorCensor || !errorCensor.text) && + __('Your hub has blocked this content because it subscribes to the following blocking channel:')} + {errorCensor && errorCensor.text}{' '}