summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/nuldoc-src/components/Pagination.tsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-06-27 23:39:31 +0900
committernsfisis <nsfisis@gmail.com>2025-06-27 23:39:31 +0900
commit674fe965550444db87edc7937ff6932e1a918d9d (patch)
treee8a80dd958d3e082485286bf5785a7992b6e6b0e /vhosts/blog/nuldoc-src/components/Pagination.tsx
parentfe4d1d625b53796c5f20399790e5ff8c7a7e1608 (diff)
downloadnsfisis.dev-674fe965550444db87edc7937ff6932e1a918d9d.tar.gz
nsfisis.dev-674fe965550444db87edc7937ff6932e1a918d9d.tar.zst
nsfisis.dev-674fe965550444db87edc7937ff6932e1a918d9d.zip
feat(meta): rename vhosts/ directory to services/
Diffstat (limited to 'vhosts/blog/nuldoc-src/components/Pagination.tsx')
-rw-r--r--vhosts/blog/nuldoc-src/components/Pagination.tsx45
1 files changed, 0 insertions, 45 deletions
diff --git a/vhosts/blog/nuldoc-src/components/Pagination.tsx b/vhosts/blog/nuldoc-src/components/Pagination.tsx
deleted file mode 100644
index 5527c924..00000000
--- a/vhosts/blog/nuldoc-src/components/Pagination.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-type Props = {
- currentPage: number;
- totalPages: number;
- basePath: string;
-};
-
-export default function Pagination(
- { currentPage, totalPages, basePath }: Props,
-) {
- if (totalPages <= 1) {
- return <div></div>;
- }
-
- const prevPage = currentPage > 1 ? currentPage - 1 : null;
- const nextPage = currentPage < totalPages ? currentPage + 1 : null;
-
- const prevHref = prevPage === 1 ? basePath : `${basePath}${prevPage}/`;
- const nextHref = `${basePath}${nextPage}/`;
-
- return (
- <nav className="pagination">
- <div className="pagination-prev">
- {prevPage
- ? (
- <a href={prevHref}>
- 前のページ
- </a>
- )
- : null}
- </div>
- <div className="pagination-info">
- {String(currentPage)} / {String(totalPages)}
- </div>
- <div className="pagination-next">
- {nextPage
- ? (
- <a href={nextHref}>
- 次のページ
- </a>
- )
- : null}
- </div>
- </nav>
- );
-}