diff --git a/public/uploads/1762349790327-56eucbsdkiy.webp b/public/uploads/1762349790327-56eucbsdkiy.webp new file mode 100644 index 0000000..8373104 Binary files /dev/null and b/public/uploads/1762349790327-56eucbsdkiy.webp differ diff --git a/public/uploads/1762349798482-lg2199h4w0h.webp b/public/uploads/1762349798482-lg2199h4w0h.webp new file mode 100644 index 0000000..9bbf507 Binary files /dev/null and b/public/uploads/1762349798482-lg2199h4w0h.webp differ diff --git a/src/app/components/BoardPanelClient.tsx b/src/app/components/BoardPanelClient.tsx index 8dfc6f3..74f949f 100644 --- a/src/app/components/BoardPanelClient.tsx +++ b/src/app/components/BoardPanelClient.tsx @@ -43,15 +43,15 @@ type BoardPanelData = { textPosts?: PostData[]; }; -export function BoardPanelClient({ - initialBoardId, - boardsData -}: { - initialBoardId: string; +export function BoardPanelClient({ + initialBoardId, + boardsData +}: { + initialBoardId: string; boardsData: BoardPanelData[]; }) { const [selectedBoardId, setSelectedBoardId] = useState(initialBoardId); - + // 선택된 게시판 데이터 찾기 const selectedBoardData = boardsData.find(bd => bd.board.id === selectedBoardId) || boardsData[0]; const { board, categoryName, siblingBoards } = selectedBoardData; @@ -103,23 +103,22 @@ export function BoardPanelClient({
{categoryName || board.name}
- - - - - - - - + + + + + + + +
{siblingBoards.map((sb) => ( @@ -128,45 +127,49 @@ export function BoardPanelClient({
-
-
+
+
{selectedBoardData.specialRankUsers.map((user, idx) => { const rank = idx + 1; return ( - -
- +
+ -
- +
+
-
-
-
-
- {rank === 1 && } - {rank === 2 && } - {rank === 3 && } -
-
+
+
+
+ { + (rank === 1 || rank === 2 || rank === 3) && ( +
+ {rank === 1 && } + {rank === 2 && } + {rank === 3 && } +
+ ) + } +
{rank}위
-
+
{user.nickname || "익명"}
-
- - +
+ + - {user.points.toLocaleString()} + {user.points.toLocaleString()}
@@ -189,10 +192,10 @@ export function BoardPanelClient({
{categoryName || board.name}
- + - +
@@ -201,9 +204,8 @@ export function BoardPanelClient({ @@ -212,14 +214,14 @@ export function BoardPanelClient({
-
-
+
+
{selectedBoardData.previewPosts.map((post) => { // attachments에서 이미지를 먼저 찾고, 없으면 content에서 추출 const firstImage = post.attachments?.[0]?.url || extractImageFromContent(post.content); return ( - -
+ +
{firstImage ? ( )}
-
-
-
+
+
+
{board.name}
-
- {isNewWithin1Hour(post.createdAt) && ( - <> - - - -
n
- - )} -
- {stripHtml(post.title)} + {isNewWithin1Hour(post.createdAt) && ( +
+ + + +
n
+
+ )} + {stripHtml(post.title)} {(post.stat?.commentsCount ?? 0) > 0 && ( - [{post.stat?.commentsCount}] + [{post.stat?.commentsCount}] )}
- + {formatDateYmd(post.createdAt)}
@@ -280,11 +280,11 @@ export function BoardPanelClient({ {/* 기본 아이콘 */} - + {/* 호버 아이콘 */} - +
@@ -293,9 +293,8 @@ export function BoardPanelClient({ @@ -314,19 +313,17 @@ export function BoardPanelClient({
    {selectedBoardData.textPosts.map((p) => ( -
  • +
  • -
    - {isNewWithin1Hour(p.createdAt) && ( - <> - - - -
    n
    - - )} -
    + {isNewWithin1Hour(p.createdAt) && ( +
    + + + +
    n
    +
    + )} {stripHtml(p.title)} {(p.stat?.commentsCount ?? 0) > 0 && ( [{p.stat?.commentsCount}] diff --git a/src/app/page.tsx b/src/app/page.tsx index 4d28042..2b045cc 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -146,7 +146,7 @@ export default async function Home({ searchParams }: { searchParams: Promise<{ s select: { userId: true, nickname: true, points: true, profileImage: true, grade: true }, where: { status: "active" }, orderBy: { points: "desc" }, - take: 3, + take: 6, }); } else if (isPreview) { previewPosts = await prisma.post.findMany({ @@ -165,7 +165,7 @@ export default async function Home({ searchParams }: { searchParams: Promise<{ s stat: { select: { commentsCount: true } }, }, orderBy: { createdAt: "desc" }, - take: 3, + take: 6, }); } else if (isTextMain) { textPosts = await prisma.post.findMany({ diff --git a/src/app/posts/new/page.tsx b/src/app/posts/new/page.tsx index d5e2a85..a783395 100644 --- a/src/app/posts/new/page.tsx +++ b/src/app/posts/new/page.tsx @@ -82,7 +82,7 @@ export default function NewPostPage() { className="h-16 rounded-2xl border border-neutral-300 px-6 text-base text-neutral-900 bg-white hover:bg-neutral-50" onClick={() => {/* 태그 선택 자리표시 */}} > - 테그선택 + 태그선택