mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
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:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user