teqo-backup/src/components/campaign/shared/CampaignListFooter.tsx
Francisco Ignácio Fontoura Solla c706c62098 Pass 2 W2: components/campaign em subpastas por dominio
106 arquivos flat -> 15 dominios (actionPlan, advisor, auth, dashboard, demand, invite, leadership, map, municipality, organization, stateDeputy, supporter, votePledge, shared, shell) via git mv; imports absolutos reescritos em 98 arquivos; excecao de lint do campaign-logo e paths dos specs de contrato (campaignInviteUi, campaignComponents) atualizados. Sem mudanca de conteudo nos componentes.
2026-07-25 14:52:17 -03:00

31 lines
890 B
TypeScript

import { CampaignListPagination } from '@/components/campaign/shared/CampaignListPagination'
/**
* The count line + pagination every campaign list renders under its results.
* Server component: `hrefForPage` stays on the server (the pagination anchors
* are the client leaves).
*/
export const CampaignListFooter = ({
totalDocs,
singular,
plural,
page,
totalPages,
hrefForPage,
}: {
totalDocs: number
/** e.g. "município encontrado" */
singular: string
/** e.g. "municípios encontrados" */
plural: string
page: number
totalPages: number
hrefForPage: (page: number) => string
}) => (
<div className="flex flex-col items-center gap-2">
<p className="text-sm text-muted-foreground">
{totalDocs} {totalDocs === 1 ? singular : plural}
</p>
<CampaignListPagination page={page} totalPages={totalPages} hrefForPage={hrefForPage} />
</div>
)