feat(board-pagination): redirect /boardIdentifier/1 to not-found, refine [All] button, hide pagelist when infinite scroll enabled

This commit is contained in:
plebeius
2026-02-24 19:34:55 +08:00
parent 0ddb22f5fa
commit dc43a8438e
3 changed files with 103 additions and 55 deletions
+9 -1
View File
@@ -180,6 +180,14 @@ const CatalogFeedRoute = () => {
return <Catalog viewType={viewType} boardIdentifier={params.boardIdentifier} />;
};
const PageOneGuard = () => {
const { pageNumber } = useParams();
if (pageNumber === '1') {
return <Navigate to='/not-found' replace />;
}
return null;
};
const ModQueueRoute = () => {
const { boardIdentifier } = useParams();
const account = useAccount();
@@ -261,7 +269,7 @@ const App = () => {
<Route path='/subs/*' element={<Navigate to='/not-found' replace />} />
<Route path='/mod/*' element={<Navigate to='/not-found' replace />} />
<Route path='/:boardIdentifier/:pageNumber' element={boardFeedElement} />
<Route path='/:boardIdentifier/:pageNumber' element={<PageOneGuard />} />
<Route path='/:boardIdentifier' element={boardFeedElement} />
<Route path='/:boardIdentifier/settings' element={boardFeedElement} />
<Route path='/:boardIdentifier/catalog' element={catalogFeedElement} />