import { _ } from '@evershop/evershop/lib/locale/translate/_'; import React from 'react'; /** * Prev/next pagination for blog listings. Uses query-only relative hrefs * (`?page=N`) so it is SSR-safe (no window access, no hydration mismatch). */ export function BlogPagination({ total, currentPage = 1, limit = 20 }: { total: number; currentPage?: number; limit?: number; }) { const totalPages = Math.max(1, Math.ceil((total || 0) / (limit || 20))); if (totalPages <= 1) { return null; } const linkClass = 'border border-border rounded-md px-3 py-1.5 hover:bg-muted text-sm transition-colors'; const disabledClass = 'text-muted-foreground/40 px-3 py-1.5 text-sm'; return ( ); }