fix(mod multiboard): show account import empty state

This commit is contained in:
Tommaso Casaburi
2026-05-21 17:37:18 +07:00
parent a31c3b44d3
commit 56c4fdf3c1
42 changed files with 198 additions and 74 deletions
+2 -4
View File
@@ -32,6 +32,7 @@ import LoadingEllipsis from '../../components/loading-ellipsis';
import BoardPagination from '../../components/board-pagination';
import { CatalogButton } from '../../components/board-buttons/board-buttons';
import { PageFooterDesktop, PageFooterMobile } from '../../components/footer';
import { ModEmptyState } from '../../components/mod-empty-state';
import { Post } from '../post';
const lastVirtuosoStates: { [key: string]: StateSnapshot } = {};
@@ -41,9 +42,6 @@ const MONTH_IN_SECONDS = 30 * 24 * 60 * 60;
const YEAR_IN_SECONDS = 365 * 24 * 60 * 60;
// Keep the hook on its indexed fast path when this view should not inject local posts.
const EMPTY_ACCOUNT_COMMENT_LOOKUP = { commentIndices: [-1] };
const MOD_ACCOUNT_IMPORT_LINK_COMPONENTS = {
1: <Link to='/mod/settings#account-settings' />,
};
/** Board feed always uses 'active' sort; catalog dropdown does not affect board ordering. */
const BOARD_SORT_TYPE = 'active' as const;
@@ -137,7 +135,7 @@ const BoardFooter = ({
) : isInSubscriptionsView && subscriptionsLength === 0 ? (
<span className='red'>{t('not_subscribed_to_any_board')}</span>
) : isInModView && accountCommunityAddressesLength === 0 ? (
<Trans i18nKey='not_mod_of_any_board' components={MOD_ACCOUNT_IMPORT_LINK_COMPONENTS} />
<ModEmptyState />
) : (
showLoadingEllipsis && (hasMore || isEmptyBoardLoading) && <LoadingEllipsis string={loadingStateString} />
)}