remove logs, fixes

This commit is contained in:
Tom
2023-05-09 22:00:02 +02:00
parent 76d32ab46e
commit 762dec840d
2 changed files with 9 additions and 6 deletions
+9 -3
View File
@@ -58,17 +58,23 @@ const Subscriptions = () => {
const errorString = useMemo(() => {
for (const subplebbit of subplebbits) {
if (subplebbit?.updatingState !== 'failed') {
if (subplebbit.updatingState !== 'failed') {
return
}
}
for (const subplebbit of subplebbits) {
if (subplebbit?.error) {
setErrorMessage(`Failed fetching subplebbit: ${subplebbit?.error.toString().slice(0, 300)}`);
if (subplebbit.error) {
return `Failed fetching subplebbit: ${subplebbit.error.toString().slice(0, 300)}`
}
}
}, [subplebbits])
useEffect(() => {
if (errorString) {
setErrorMessage(errorString)
}
}, [errorString])
useEffect(() => {
setSelectedFeed(feed.sort((a, b) => b.timestamp - a.timestamp));