import { Link, useNavigate } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import useFeedViewSettingsStore from '../../stores/use-feed-view-settings-store'; import StyleSelector from '../style-selector/style-selector'; import footerStyles from '../footer/footer.module.css'; import styles from './board-pagination.module.css'; export interface BoardPaginationProps { basePath: string; currentPage: number; totalPages: number; /** When true, renders pagelist: [All] [1] [2] ... [10] Catalog Archive + Style select */ footerStyle?: boolean; } const BoardPagination = ({ basePath, currentPage, totalPages, footerStyle = false }: BoardPaginationProps) => { const { t } = useTranslation(); const navigate = useNavigate(); const enableInfiniteScroll = useFeedViewSettingsStore((state) => state.enableInfiniteScroll); const setEnableInfiniteScroll = useFeedViewSettingsStore((state) => state.setEnableInfiniteScroll); const pageHref = (page: number) => (page === 1 ? basePath : `${basePath}/${page}`); const catalogHref = `${basePath}/catalog`; if (totalPages <= 1 && !footerStyle) { return null; } if (footerStyle) { const pageNumbers = Array.from({ length: totalPages }, (_, i) => i + 1); const archiveHref = `${basePath}/archive`; return (