From 983d67983e0648da09310a532e6109c7ce57c309 Mon Sep 17 00:00:00 2001 From: bicochan Date: Tue, 29 Apr 2025 17:15:27 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20rewrite=20=EC=8B=9C=20=EC=A0=95?= =?UTF-8?q?=EC=A0=81=20=EC=9E=90=EC=82=B0=20=EA=B2=BD=EB=A1=9C=20=EC=85=8B?= =?UTF-8?q?=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/features/package.json | 2 +- .../src/pages/notice/ui/notice-page.tsx | 28 +++++++++---------- apps/cs/next.config.ts | 3 +- apps/cs/src/pages/bbs/model/table-columns.tsx | 23 +++++++++++++-- 4 files changed, 37 insertions(+), 19 deletions(-) diff --git a/apps/common/features/package.json b/apps/common/features/package.json index 8960c2cdb..a0a89ebae 100644 --- a/apps/common/features/package.json +++ b/apps/common/features/package.json @@ -1,5 +1,5 @@ { - "name": "cs", + "name": "features", "version": "0.0.0", "private": true, "scripts": { diff --git a/apps/common/features/src/pages/notice/ui/notice-page.tsx b/apps/common/features/src/pages/notice/ui/notice-page.tsx index 8f1cf2128..6bbbabc4c 100644 --- a/apps/common/features/src/pages/notice/ui/notice-page.tsx +++ b/apps/common/features/src/pages/notice/ui/notice-page.tsx @@ -1,8 +1,14 @@ "use client"; -import { PostApi, type Post, type PostParams } from "@/entities/post"; -import { ENDPOINT } from "@/shared/config"; -import { PageLayout } from "@/shared/ui/page-layout"; +import { useEffect, useState } from "react"; +import { useRouter } from "next/navigation"; +import { useQuery } from "@tanstack/react-query"; +import { + getCoreRowModel, + useReactTable, + type PaginationState, + type RowSelectionState, +} from "@tanstack/react-table"; import { Button, DataTable, @@ -14,15 +20,9 @@ import { SelectTrigger, SelectValue, } from "@common/components/ui"; -import { useQuery } from "@tanstack/react-query"; -import { - getCoreRowModel, - useReactTable, - type PaginationState, - type RowSelectionState, -} from "@tanstack/react-table"; -import { useRouter } from "next/navigation"; -import { useEffect, useState } from "react"; +import { PostApi, type Post, type PostParams } from "@/entities/post"; +import { ENDPOINT } from "@/shared/config"; +import { PageLayout } from "@/shared/ui/page-layout"; import { columns } from "../model/notice-table-columns"; function NoticePage({ bbsId }: { bbsId: string }) { @@ -30,9 +30,9 @@ function NoticePage({ bbsId }: { bbsId: string }) { const [rowSelection, setRowSelection] = useState({}); const [postParams, setPostParams] = useState({ - keywordType: "", + keywordType: "title", keyword: "", - delYn: "", + delYn: "N", }); const [pagination, setPagination] = useState({ pageIndex: 0, diff --git a/apps/cs/next.config.ts b/apps/cs/next.config.ts index 94858a153..efcddfcd5 100644 --- a/apps/cs/next.config.ts +++ b/apps/cs/next.config.ts @@ -13,7 +13,8 @@ const nextConfig: NextConfig = { has: [ { type: "header", - key: "x-rewrite-me", + key: "referer", + value: "(.*)/pst(.*)", }, ], }, diff --git a/apps/cs/src/pages/bbs/model/table-columns.tsx b/apps/cs/src/pages/bbs/model/table-columns.tsx index 697f953a7..dee415593 100644 --- a/apps/cs/src/pages/bbs/model/table-columns.tsx +++ b/apps/cs/src/pages/bbs/model/table-columns.tsx @@ -1,7 +1,8 @@ import dayjs from "dayjs"; -import type { ColumnDef } from "@tanstack/react-table"; -import { Button } from "@common/components/ui"; +import { useRouter } from "next/navigation"; +import type { ColumnDef, Row } from "@tanstack/react-table"; import type { Board } from "@/entities/board/model/board-interface"; +import { Button } from "@common/components/ui"; export const columns: ColumnDef[] = [ { @@ -36,6 +37,22 @@ export const columns: ColumnDef[] = [ { id: "actions", header: "관리", - cell: () => , + cell: ({ row }) => , }, ]; + +const ManageButton = ({ row }: { row: Row }) => { + const router = useRouter(); + const { bbsTypeCd, bbsId } = row.original; + return ( + + ); +};