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}
>대분류 추가
-
{
- e.preventDefault();
- e.dataTransfer.dropEffect = 'move';
- if (draggingCatIndex === null) return;
- const ids = (catOrder.length ? catOrder : categories.map((c: any) => c.id));
- // 현재 마우스 Y에 해당하는 행 인덱스 계산
- let overIdx = -1;
- for (let i = 0; i < ids.length; i++) {
- const el = catRefs.current[ids[i]];
- if (!el) continue;
- const rect = el.getBoundingClientRect();
- const mid = rect.top + rect.height / 2;
- if (e.clientY < mid) { overIdx = i; break; }
- }
- if (overIdx === -1) overIdx = ids.length - 1;
- if (overIdx === draggingCatIndex) return;
- setCatOrder((order) => {
- const base = order.length ? order : categories.map((c: any) => c.id);
- const next = [...base];
- const [moved] = next.splice(draggingCatIndex, 1);
- next.splice(overIdx, 0, moved);
- setDraggingCatIndex(overIdx);
- const nextCats = next.map((id) => categories.find((c: any) => c.id === id)).filter(Boolean) as any[];
- reorderCategories(nextCats);
- return next;
- });
- }}
- onDragEnter={(e) => { e.preventDefault(); e.dataTransfer.dropEffect = 'move'; }}
- onDrop={(e) => {
- e.preventDefault();
- const ids = (catOrder.length ? catOrder : categories.map((c: any) => c.id));
- const nextCats = ids.map((id) => categories.find((c: any) => c.id === id)).filter(Boolean) as any[];
- reorderCategories(nextCats);
- setDraggingCatIndex(null);
- }}
- >
+
{groups.map((g, idx) => (
- - { catRefs.current[g.id] = el; }}
-
- onDrop={(e) => {
- e.preventDefault();
- setDraggingCatIndex(null);
- }}
- onDragEnd={() => { setDraggingCatIndex(null); }}
- >
+
-
{idx + 1}
{g.id === 'uncat' ? (
@@ -333,9 +301,25 @@ export default function AdminBoardsPage() {
미분류 (카테고리 없음)
) : (
- markCatDirty(g.id, { ...payload })} onDragStart={() => {
- setDraggingCatIndex(idx);
- }} />
+ markCatDirty(g.id, { ...payload })} />
+ )}
+ {g.id !== 'uncat' && (
+
+
+
+
)}