Skip to content

Commit

Permalink
feat: 글쓰기 수정하기 컴포넌트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
heonq committed Dec 7, 2024
1 parent 03da8ea commit 1229790
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/community/writeForm/writeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -52,7 +52,7 @@ export default function WriteForm({ initialData, articleId }: WriteFormProps) {
>
<div className='flex justify-between items-center mb-8'>
<h2 className='text-xl font-bold'>
{isEditMode ? '게시글 쓰기' : '게시글 수정하기'}
{isEditMode ? '게시글 수정하기' : '게시글 쓰기'}
</h2>
<CommonBtn
disabled={!formComplete}
Expand Down

0 comments on commit 1229790

Please sign in to comment.