mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
perf(popular-threads): show board-count loading state for popular threads
This commit is contained in:
@@ -157,12 +157,16 @@ export const useFeedStateString = (subplebbitAddresses?: string[]): string | und
|
||||
}
|
||||
}
|
||||
|
||||
if (!stateString && subplebbitAddresses?.length) {
|
||||
stateString = `downloading ${subplebbitAddresses.length} boards`;
|
||||
}
|
||||
|
||||
// capitalize first letter
|
||||
stateString = stateString.charAt(0).toUpperCase() + stateString.slice(1);
|
||||
|
||||
// if string is empty, return undefined instead
|
||||
return stateString === '' ? undefined : stateString;
|
||||
}, [states, subplebbitAddress]);
|
||||
}, [states, subplebbitAddress, subplebbitAddresses]);
|
||||
|
||||
if (singleSubplebbitFeedStateString) {
|
||||
return singleSubplebbitFeedStateString;
|
||||
|
||||
Reference in New Issue
Block a user