refactor(routing): namespace board mod queue under board mod routes

Updated the canonical board mod queue URL to /:boardIdentifier/mod/queue and made legacy /:boardIdentifier/modqueue paths resolve to not found. Tightened route helpers so board-scoped mod URLs no longer fall through as generic board pages.
This commit is contained in:
plebeius
2026-03-07 16:02:19 +08:00
parent 4eed34e4a7
commit 95088300bd
6 changed files with 118 additions and 16 deletions
+4 -1
View File
@@ -1,3 +1,5 @@
import { isBoardModRoute, isModQueueRoute } from './route-utils';
export type ParamsType = {
accountCommentIndex?: string;
boardIdentifier?: string;
@@ -17,6 +19,7 @@ export const isBoardView = (pathname: string, params: ParamsType): boolean => {
pathname.startsWith('/all') ||
pathname.startsWith('/subs') ||
pathname.startsWith('/mod') ||
isBoardModRoute(pathname) ||
pathname.startsWith('/pending') ||
pathname === '/' ||
pathname.startsWith('/faq') ||
@@ -53,7 +56,7 @@ export const isModView = (pathname: string): boolean => {
};
export const isModQueueView = (pathname: string): boolean => {
return pathname.includes('/modqueue');
return isModQueueRoute(pathname);
};
export const isPendingPostView = (pathname: string, params: ParamsType): boolean => {