diff --git a/components/ui/index.ts b/components/ui/index.ts
index f202f8ffe5..d2267337a5 100644
--- a/components/ui/index.ts
+++ b/components/ui/index.ts
@@ -1,6 +1,7 @@
export * from "./alert/Alert";
export * from "./dialog/Dialog";
export * from "./header/Header";
+export * from "./pagination/Pagination";
export * from "./select/Select";
export * from "./sidebar";
export * from "./table/StatusBadge";
diff --git a/components/ui/pagination/Pagination.tsx b/components/ui/pagination/Pagination.tsx
new file mode 100644
index 0000000000..e490942398
--- /dev/null
+++ b/components/ui/pagination/Pagination.tsx
@@ -0,0 +1,95 @@
+"use client";
+
+import Link from "next/link";
+import { usePathname, useSearchParams } from "next/navigation";
+import React from "react";
+
+interface Props {
+ totalPages: number;
+ currentPage: number;
+ nextPage?: string;
+}
+
+export const Pagination = ({ totalPages, currentPage }: Props) => {
+ const pathname = usePathname();
+ const searchParams = useSearchParams();
+ // const currentPage = searchParams["page"] ?? "1";
+ const createPageUrl = (pageNumber: number | string) => {
+ const params = new URLSearchParams(searchParams);
+
+ if (pageNumber === "...") return `${pathname}?${params.toString()}`;
+
+ if (+pageNumber <= 0) {
+ return `${pathname}`;
+ }
+ if (+pageNumber > totalPages) {
+ return `${pathname}?${params.toString()}`;
+ }
+ params.set("page", pageNumber.toString());
+ return `${pathname}?${params.toString()}`;
+ };
+
+ console.log(pathname, searchParams, currentPage);
+
+ return (
+
+ );
+};