mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(mod-queue): show empty state instead of not-allowed redirect
When the account moderates no boards, render ModEmptyState on the global /mod/queue route instead of sending users to /not-allowed.
This commit is contained in:
+2
-1
@@ -52,6 +52,7 @@ import PostForm from './components/post-form/post-form';
|
||||
import BoardBlotter from './components/board-blotter/board-blotter';
|
||||
import BoardsBar from './components/boards-bar/boards-bar';
|
||||
import ExternalQuoteStatus from './components/external-quote-status/external-quote-status';
|
||||
import ModEmptyState from './components/mod-empty-state/mod-empty-state';
|
||||
|
||||
const AccountDataEditor = lazy(() => import('./views/account-data-editor'));
|
||||
const BoardsBarEditModal = lazy(() => import('./components/boards-bar-edit-modal'));
|
||||
@@ -265,7 +266,7 @@ const ModQueueRoute = () => {
|
||||
}
|
||||
|
||||
if (!boardIdentifier) {
|
||||
return accountCommunityAddresses.length > 0 ? <ModQueueView /> : <Navigate to='/not-allowed' replace />;
|
||||
return accountCommunityAddresses.length > 0 ? <ModQueueView /> : <ModEmptyState />;
|
||||
}
|
||||
|
||||
// Wait for board role metadata before enforcing access to avoid false redirects during initial load.
|
||||
|
||||
Reference in New Issue
Block a user