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 ( + + ); +};