feat(board): show error in feed near loading string

This commit is contained in:
Tom (plebeius.eth)
2024-06-03 11:04:53 +02:00
parent 994ec54190
commit 4b2a6025d3
2 changed files with 10 additions and 6 deletions
+7 -1
View File
@@ -49,7 +49,7 @@ const Board = () => {
setResetFunction(reset);
}, [reset, setResetFunction]);
const subplebbit = useSubplebbit({ subplebbitAddress });
const { subplebbit, error } = useSubplebbit({ subplebbitAddress });
const { createdAt, description, rules, shortAddress, state, suggested } = subplebbit || {};
const title = isInAllView ? t('all') : isInSubscriptionsView ? t('subscriptions') : subplebbit?.title;
@@ -65,6 +65,12 @@ const Board = () => {
) : (
<LoadingEllipsis string={loadingStateString} />
)}
{error && (
<div style={{ color: 'red' }}>
<br />
{error.message}
</div>
)}
</div>
);