import React from 'react'; import { useTranslations } from 'next-intl'; const Pagination = ({ currentPage, totalPages, onPageChange }) => { const t = useTranslations('pagination'); const pages = Array.from({ length: totalPages }, (_, i) => i + 1); return (
{t('page')} {currentPage} {t('of')} {pages.length}
{currentPage > 1 && ( onPageChange(currentPage - 1)} /> )} {pages.map((page) => ( onPageChange(page)} /> ))} {currentPage < totalPages && ( onPageChange(currentPage + 1)} /> )}
); }; const PaginationButton = ({ text, onClick }) => ( ); const PaginationNumber = ({ number, active, onClick }) => ( ); export default Pagination;