diff --git a/src/App.tsx b/src/App.tsx
index 33c0198..28c2406 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,5 +1,5 @@
import './App.css'
-import { CommentItem, CommentListContainer, SubCommentData } from './Comment';
+import { CommentItem, CommentListContainer, CommentPagination, SubCommentData } from './Comment';
import CommentHeader from './CommentHeader';
import { Footer } from './Footer';
import { GalleryContent } from './Gallery';
@@ -197,6 +197,7 @@ function App() {
showDelete: true,
}} />
+
diff --git a/src/Comment.tsx b/src/Comment.tsx
index 8432052..511c9ad 100644
--- a/src/Comment.tsx
+++ b/src/Comment.tsx
@@ -1,4 +1,6 @@
+import { Separator } from "./Separator";
import { AuthorData } from "./table";
+import { cn } from "./util/cn";
interface CommentDataBase {
id: number;
@@ -183,3 +185,80 @@ export function CommentReplySection({ comments }: { comments: SubCommentData[] }
);
}
+
+// Define the props the component will accept
+interface CommentPaginationProps {
+ currentPage: number;
+ maxPage: number;
+ onPageChange?: (page: number) => void; // Optional callback for page changes
+ onViewContent?: () => void; // Optional click handler for "본문 보기"
+ onCloseComments?: () => void; // Optional click handler for "댓글닫기"
+ onRefresh?: () => void; // Optional click handler for "새로고침"
+}
+
+export const CommentPagination: React.FC = ({
+ currentPage,
+ maxPage,
+ onViewContent,
+ onCloseComments,
+ onRefresh,
+}) => {
+ const pageNumbers = Array.from({ length: maxPage }, (_, i) => i + 1); // Generate page numbers
+
+ return (
+
+ {/* Page Number Section */}
+ {/* pt/pb values approximate vertical centering within the 69px height */}
+ {/* text-center on parent handles horizontal centering */}
+
+ {pageNumbers.map((page) => (
+
+ {page}
+
+ ))}
+ {/* Add other page numbers logic here if needed */}
+
+
+ {/* Buttons Section */}
+
+
+ );
+};
\ No newline at end of file