From 1229790b9f81200b77b991d8d343a1ac79e06787 Mon Sep 17 00:00:00 2001 From: heonq Date: Sat, 7 Dec 2024 15:38:32 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B8=80=EC=93=B0=EA=B8=B0=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=ED=95=98=EA=B8=B0=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/community/writeForm/writeForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/community/writeForm/writeForm.tsx b/src/components/community/writeForm/writeForm.tsx index 89eb9ab2..7aca7366 100644 --- a/src/components/community/writeForm/writeForm.tsx +++ b/src/components/community/writeForm/writeForm.tsx @@ -10,7 +10,7 @@ import { useMutation, useQueryClient } from '@tanstack/react-query'; export default function WriteForm({ initialData, articleId }: WriteFormProps) { const pathname = usePathname(); - const isEditMode = pathname.includes('/edit'); + const isEditMode = pathname.split('/').includes('/edit'); const [title, setTitle] = useState(initialData?.title || ''); const [content, setContent] = useState(initialData?.content || ''); const queryClient = useQueryClient(); @@ -52,7 +52,7 @@ export default function WriteForm({ initialData, articleId }: WriteFormProps) { >

- {isEditMode ? '게시글 쓰기' : '게시글 수정하기'} + {isEditMode ? '게시글 수정하기' : '게시글 쓰기'}