fix(home): unify stats loading state with feed status string

Show a single centered loader without stat labels until all directory
stats resolve, using useFeedStateString like popular threads. Center
directory table status loading in its cell.
This commit is contained in:
Tommaso Casaburi
2026-05-29 17:47:47 +07:00
parent 45a113c621
commit a435d93c8a
4 changed files with 48 additions and 22 deletions
+9 -1
View File
@@ -145,8 +145,16 @@
word-break: break-all;
}
.ownerCell {
.ownerCell,
.statusCell {
text-align: center;
vertical-align: middle;
}
.statusLoading {
display: block;
width: fit-content;
margin-inline: auto;
}
.ownerName {
+3 -1
View File
@@ -135,7 +135,9 @@ const DirectoryRow = ({ board, nowSeconds, rank, onVote }: DirectoryRowProps) =>
</Tooltip>
</span>
) : status === 'loading' ? (
<LoadingEllipsis string={t('loading')} />
<span className={styles.statusLoading}>
<LoadingEllipsis string={t('loading')} />
</span>
) : status === 'unknown' ? (
<span className={styles.statusUnavailable}>{DIRECTORY_STATUS_UNAVAILABLE_MARKER}</span>
) : (