mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
remove logs, fixes
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user