import * as React from 'react'; import { Translate } from '../i18n/Translate'; import { useTranslate } from '../i18n/useTranslate'; import { useListContext } from '../controller/list/useListContext'; export const Pagination = () => { const { page, perPage, total, setPage } = useListContext(); const translate = useTranslate(); if (total === undefined) { return null; } const nbPages = Math.ceil(total / perPage) || 1; return (