적용적용
Some checks failed
deploy-on-main / deploy (push) Failing after 23s

This commit is contained in:
koreacomp5
2025-11-08 01:21:44 +09:00
parent bb71b892ca
commit 1c2222da67
9 changed files with 276 additions and 60 deletions

View File

@@ -195,7 +195,7 @@ export function RelatedPosts({ boardId, boardName, currentPostId, pageSize = 10
<button
onClick={() => handlePageChange(Math.max(1, page - 1))}
disabled={page <= 1}
className="h-9 px-3 rounded-md border border-neutral-300 bg-white text-sm disabled:opacity-50"
className="h-9 px-3 rounded-md border border-neutral-300 bg-white text-sm disabled:opacity-50 cursor-pointer hover:bg-neutral-100"
>
Previous
</button>
@@ -220,7 +220,7 @@ export function RelatedPosts({ boardId, boardName, currentPostId, pageSize = 10
key={`p-${n}-${idx}`}
onClick={() => handlePageChange(n)}
aria-current={n === page ? "page" : undefined}
className={`h-9 w-9 rounded-md border ${n === page ? "border-neutral-300 text-[#f94b37] font-semibold" : "border-neutral-300 text-neutral-900"}`}
className={`h-9 w-9 rounded-md border cursor-pointer ${n === page ? "border-neutral-300 text-[#f94b37] font-semibold hover:bg-neutral-100" : "border-neutral-300 text-neutral-900 hover:bg-neutral-100"}`}
>
{n}
</button>
@@ -234,7 +234,7 @@ export function RelatedPosts({ boardId, boardName, currentPostId, pageSize = 10
<button
onClick={() => handlePageChange(Math.min(totalPages, page + 1))}
disabled={page >= totalPages}
className="h-9 px-3 rounded-md border border-neutral-300 bg-white text-sm disabled:opacity-50"
className="h-9 px-3 rounded-md border border-neutral-300 bg-white text-sm disabled:opacity-50 cursor-pointer hover:bg-neutral-100"
>
Next
</button>
@@ -244,7 +244,7 @@ export function RelatedPosts({ boardId, boardName, currentPostId, pageSize = 10
<select
value={currentPageSize}
onChange={(e) => handlePageSizeChange(parseInt(e.target.value, 10))}
className="h-9 px-2 rounded-md border border-neutral-300 bg-white text-sm"
className="h-[36px] px-[12px] rounded-[6px] border border-[#d5d5d5] bg-white text-[14px] text-[#161616] cursor-pointer hover:bg-neutral-100"
>
<option value="10">10</option>
<option value="20">20</option>

View File

@@ -64,12 +64,14 @@ export default async function PostDetail({ params }: { params: any }) {
{/* 같은 게시판 게시글 목록 */}
{post?.boardId && post?.board && (
<RelatedPosts
boardId={post.boardId}
boardName={post.board.name}
currentPostId={id}
pageSize={10}
/>
<section className="px-[0px] md:px-[30px]">
<RelatedPosts
boardId={post.boardId}
boardName={post.board.name}
currentPostId={id}
pageSize={10}
/>
</section>
)}
</div>
);