import React from 'react'; import { useTranslation } from '@/hooks/useTranslation'; import { PageInfo } from '@/types/book'; interface PageInfoProps { bookFormat: string; section?: PageInfo; pageinfo?: PageInfo; gapRight: string; } const PageInfoView: React.FC = ({ bookFormat, section, pageinfo, gapRight }) => { const _ = useTranslation(); const pageInfo = bookFormat === 'PDF' ? section ? `${section.current + 1} / ${section.total}` : '' : pageinfo ? _('Loc. {{currentPage}} / {{totalPage}}', { currentPage: pageinfo.current + 1, totalPage: pageinfo.total, }) : ''; return (

{pageInfo}

); }; export default PageInfoView;