Wrapper component around `Pagination` that synchronizes page state with the URL query string without triggering a full navigation, while preserving scroll position. ## Key Components - **`UnifiedPagination`** — Primary export; renders `Pagination` only when `totalPages > 1` - **`UnifiedPaginationProps`** — Interface defining `currentPage`, `totalPages`, optional `onPageChange` callback, and `className` - **`handlePageChange`** — Internal handler that updates local state via `onPageChange`, syncs the `page` query param via `window.history.replaceState`, and restores scroll position after render ## Usage Example ```typescript import { UnifiedPagination } from "./unified-pagination" function ArticleList() { const [page, setPage] = useState(1) const totalPages = 10 return ( <> {/* ...list content... */} ) } ``` ## Behavior Notes | Behavior | Detail | |---|---| | URL sync | Updates `?page=N` via `replaceState` — no re-render or navigation | | Scroll preservation | Captures `window.scrollY` before page change, restores with `behavior: 'instant'` after a `setTimeout(0)` | | Hidden when unnecessary | Returns `null` when `totalPages <= 1` | | Bookmark support | URL reflects current page, allowing users to share or reload at the correct page |