feat(catalog): display error from subplebbit in feed (such as, 'address is incorrect')

This commit is contained in:
Tom (plebeius.eth)
2024-06-27 14:13:46 +02:00
parent 4f312f67c0
commit 9495e98183
+7 -1
View File
@@ -154,7 +154,7 @@ const Catalog = () => {
}, [reset, setResetFunction]);
const subplebbit = useSubplebbit({ subplebbitAddress });
const { shortAddress, state, title } = subplebbit || {};
const { error, shortAddress, state, title } = subplebbit || {};
const loadingStateString = useFeedStateString(subplebbitAddresses) || t('loading');
const loadingString = (
<div className={styles.stateString}>
@@ -165,6 +165,12 @@ const Catalog = () => {
) : (
<LoadingEllipsis string={loadingStateString} />
)}
{error && (
<div style={{ color: 'red' }}>
<br />
{error.message}
</div>
)}
</div>
);