mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(board): warn on unverified addresses
This commit is contained in:
@@ -594,6 +594,13 @@ const Board = ({ feedCacheKey, viewType, boardIdentifier: boardIdentifierProp, t
|
||||
}, [title, shortAddress, communityAddress, isVisible, params.boardIdentifier, boardIdentifierProp, directories, isInAllView, isInSubscriptionsView, isInModView, t]);
|
||||
|
||||
const shouldShowErrorToUser = communityError?.message && feed.length === 0;
|
||||
const shouldShowUnverifiedAddressWarning =
|
||||
!isMultiboardView &&
|
||||
typeof communityIdentifier?.name === 'string' &&
|
||||
communityIdentifier.name.includes('.') &&
|
||||
typeof communityIdentifier.publicKey === 'string' &&
|
||||
communityIdentifier.publicKey.length > 0 &&
|
||||
communityData?.nameResolved === false;
|
||||
const displayFeed = effectiveInfiniteScroll ? combinedFeed : currentPageFeed;
|
||||
|
||||
return (
|
||||
@@ -605,6 +612,11 @@ const Board = ({ feedCacheKey, viewType, boardIdentifier: boardIdentifierProp, t
|
||||
<ErrorDisplay error={communityError} />
|
||||
</div>
|
||||
)}
|
||||
{shouldShowUnverifiedAddressWarning && (
|
||||
<div className={styles.addressWarning} role='status'>
|
||||
{t('board_address_unverified_warning')}
|
||||
</div>
|
||||
)}
|
||||
{effectiveInfiniteScroll ? (
|
||||
<Virtuoso
|
||||
defaultItemHeight={defaultBoardItemHeight}
|
||||
|
||||
Reference in New Issue
Block a user