mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(board-pagination): hide pagelist in multiboards, right-align style selector
This commit is contained in:
@@ -11,9 +11,11 @@ export interface BoardPaginationProps {
|
||||
totalPages: number;
|
||||
/** When true, renders pagelist: [All] [1] [2] ... [10] Catalog Archive + Style select */
|
||||
footerStyle?: boolean;
|
||||
/** When true, pagelist is never shown (multiboards always use infinite scroll) */
|
||||
isMultiboard?: boolean;
|
||||
}
|
||||
|
||||
const BoardPagination = ({ basePath, currentPage, totalPages, footerStyle = false }: BoardPaginationProps) => {
|
||||
const BoardPagination = ({ basePath, currentPage, totalPages, footerStyle = false, isMultiboard = false }: BoardPaginationProps) => {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const enableInfiniteScroll = useFeedViewSettingsStore((state) => state.enableInfiniteScroll);
|
||||
@@ -31,8 +33,8 @@ const BoardPagination = ({ basePath, currentPage, totalPages, footerStyle = fals
|
||||
const archiveHref = `${basePath}/archive`;
|
||||
|
||||
return (
|
||||
<div className={footerStyles.footerRow}>
|
||||
{!enableInfiniteScroll && (
|
||||
<div className={`${footerStyles.footerRow} ${isMultiboard ? footerStyles.footerRowRightOnly : ''}`}>
|
||||
{!isMultiboard && !enableInfiniteScroll && (
|
||||
<div className={styles.pagelist}>
|
||||
{currentPage > 1 && (
|
||||
<button type='button' className={styles.pagelistNavButton} onClick={() => navigate(pageHref(currentPage - 1))}>
|
||||
|
||||
Reference in New Issue
Block a user