222
This commit is contained in:
@@ -43,16 +43,20 @@ export function PostList({ boardId, sort = "recent", q, tag, author, start, end
|
||||
return (
|
||||
<div className="w-full">
|
||||
{/* 정렬 스위치 */}
|
||||
<div className="mb-2 flex items-center gap-3 text-sm">
|
||||
<span className="text-neutral-500">정렬</span>
|
||||
<div className="px-4 py-2 border-b border-neutral-200 mb-2 flex items-center gap-2">
|
||||
<span className="text-xs text-neutral-500 mr-1">정렬</span>
|
||||
<a
|
||||
className={sort === "recent" ? "underline" : "hover:underline"}
|
||||
className={`text-xs px-3 py-1 rounded-full border transition-colors ${
|
||||
sort === "recent" ? "bg-neutral-900 text-white border-neutral-900" : "bg-white text-neutral-700 border-neutral-300 hover:bg-neutral-100"
|
||||
}`}
|
||||
href={`${q ? "/search" : "/"}?${(() => { const p = new URLSearchParams(); if (q) p.set("q", q); if (boardId) p.set("boardId", boardId); p.set("sort", "recent"); return p.toString(); })()}`}
|
||||
>
|
||||
최신
|
||||
</a>
|
||||
<a
|
||||
className={sort === "popular" ? "underline" : "hover:underline"}
|
||||
className={`text-xs px-3 py-1 rounded-full border transition-colors ${
|
||||
sort === "popular" ? "bg-neutral-900 text-white border-neutral-900" : "bg-white text-neutral-700 border-neutral-300 hover:bg-neutral-100"
|
||||
}`}
|
||||
href={`${q ? "/search" : "/"}?${(() => { const p = new URLSearchParams(); if (q) p.set("q", q); if (boardId) p.set("boardId", boardId); p.set("sort", "popular"); return p.toString(); })()}`}
|
||||
>
|
||||
인기
|
||||
|
||||
Reference in New Issue
Block a user