mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
refactor: remove description and rules mock posts
Removed all fake posts for subplebbit description and rules, including dedicated routes, components, and all related logic across the codebase. Board admins can now pin regular posts if they want to provide a description.
This commit is contained in:
@@ -105,8 +105,6 @@ export const isFeedRoute = (pathname: string): boolean => {
|
||||
const normalizedPath = pathname.endsWith('/') ? pathname.slice(0, -1) : pathname;
|
||||
|
||||
if (normalizedPath.includes('/thread/')) return false;
|
||||
if (normalizedPath.endsWith('/description')) return false;
|
||||
if (normalizedPath.endsWith('/rules')) return false;
|
||||
if (normalizedPath.startsWith('/pending/')) return false;
|
||||
|
||||
const pathWithoutSettings = normalizedPath.replace(/\/settings$/, '');
|
||||
@@ -130,8 +128,6 @@ export const isPostRoute = (pathname: string): boolean => {
|
||||
const normalizedPath = pathname.replace(/\/settings$/, '');
|
||||
|
||||
if (normalizedPath.includes('/thread/')) return true;
|
||||
if (normalizedPath.endsWith('/description')) return true;
|
||||
if (normalizedPath.endsWith('/rules')) return true;
|
||||
|
||||
return false;
|
||||
};
|
||||
@@ -150,10 +146,6 @@ export const getFeedCacheKey = (pathname: string): string | null => {
|
||||
return parts[0] || null;
|
||||
}
|
||||
|
||||
if (normalizedPath.endsWith('/description') || normalizedPath.endsWith('/rules')) {
|
||||
return normalizedPath.replace(/\/(description|rules)$/, '');
|
||||
}
|
||||
|
||||
if (normalizedPath.startsWith('/pending/')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user