diff --git a/.cursor/.prompt/1101.md b/.cursor/.prompt/1101.md new file mode 100644 index 0000000..f37a43d --- /dev/null +++ b/.cursor/.prompt/1101.md @@ -0,0 +1,17 @@ +배너 디테일 +카드 디테일 +메인 디테일 프리뷰, 글, 스페셜_랭크 + +기본 리스트 , 글이 없습니다. +글쓰기 +글뷰, 댓글 +리스트 + +스페셜_랭크 +스페셜_출석 +스페셜_제휴업체 +스페셜_제휴업체지도 + + +로그인관련 +회원쪽지 +링크로들어오면 보이고 거기서 페이지이동하면안보이게 \ No newline at end of file diff --git a/public/uploads/1761998092426-cdxtisa8vi6.webp b/public/uploads/1761998092426-cdxtisa8vi6.webp new file mode 100644 index 0000000..8373104 Binary files /dev/null and b/public/uploads/1761998092426-cdxtisa8vi6.webp differ diff --git a/src/app/admin/AdminSidebar.tsx b/src/app/admin/AdminSidebar.tsx index f4c5666..95208a5 100644 --- a/src/app/admin/AdminSidebar.tsx +++ b/src/app/admin/AdminSidebar.tsx @@ -4,12 +4,11 @@ import Link from "next/link"; import { usePathname } from "next/navigation"; const navItems = [ - { href: "/admin/menus", label: "메뉴 관리" }, + { href: "/admin/mainpage-settings", label: "메인페이지 설정" }, { href: "/admin/boards", label: "게시판" }, + { href: "/admin/banners", label: "배너" }, { href: "/admin/users", label: "사용자" }, { href: "/admin/logs", label: "로그" }, - { href: "/admin/banners", label: "배너" }, - { href: "/admin/mainpage-settings", label: "메인페이지 설정" }, ]; export default function AdminSidebar() { diff --git a/src/app/admin/boards/page.tsx b/src/app/admin/boards/page.tsx index 362ea2f..bf0ac5c 100644 --- a/src/app/admin/boards/page.tsx +++ b/src/app/admin/boards/page.tsx @@ -87,6 +87,21 @@ export default function AdminBoardsPage() { mutateBoards(); } + // 버튼으로 카테고리 순서 이동 (↑/↓) + function moveCategory(catId: string, delta: number) { + const baseIds = (catOrder.length ? catOrder : categories.map((c: any) => c.id)); + const idx = baseIds.indexOf(catId); + if (idx === -1) return; + const to = idx + delta; + if (to < 0 || to >= baseIds.length) return; + const nextIds = [...baseIds]; + const [moved] = nextIds.splice(idx, 1); + nextIds.splice(to, 0, moved); + setCatOrder(nextIds); + const nextCats = nextIds.map((id) => categories.find((c: any) => c.id === id)).filter(Boolean) as any[]; + reorderCategories(nextCats); + } + // DnD: 카테고리 순서 변경 (저장 시 반영) function reorderCategories(next: any[]) { setDirtyCats((prev) => { @@ -275,56 +290,9 @@ export default function AdminBoardsPage() { onClick={createCategory} >대분류 추가 -