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) { >