From 69297d747a584794a9a3deff56e43122d61cfd1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=B0=AC?= Date: Sun, 24 Aug 2025 09:45:00 +0900 Subject: [PATCH 1/7] =?UTF-8?q?chore:=20=EB=94=94=EB=A0=89=ED=86=A0?= =?UTF-8?q?=EB=A6=AC=20=EA=B5=AC=EC=A1=B0=EC=97=90=20=EB=A7=9E=EA=B2=8C=20?= =?UTF-8?q?=EC=BD=94=EB=A9=98=ED=8A=B8=20=ED=8C=8C=EC=9D=BC=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx | 2 +- .../[id]/[repo]/[slug] => components/Post}/CommentSection.tsx | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename gitmon-client/src/{app/[id]/[repo]/[slug] => components/Post}/CommentSection.tsx (100%) diff --git a/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx b/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx index 4dc6a9b..91c75ee 100644 --- a/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx +++ b/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx @@ -3,7 +3,7 @@ import Link from 'next/link' import { ArrowLeft, Calendar, MessageSquare } from 'lucide-react' import { formatDate, replaceId } from '@lib/utils' import { Separator } from '@components/ui/separator' -import { CommentSection } from './CommentSection' +import { CommentSection } from '@components/Post/CommentSection' import { fetchPost } from '@lib/github' import MarkdownRenderer from '@components/MarkdownRenderer' import { ShareButton } from '@components/ShareButton' diff --git a/gitmon-client/src/app/[id]/[repo]/[slug]/CommentSection.tsx b/gitmon-client/src/components/Post/CommentSection.tsx similarity index 100% rename from gitmon-client/src/app/[id]/[repo]/[slug]/CommentSection.tsx rename to gitmon-client/src/components/Post/CommentSection.tsx From 4f9f5726f540552794d1654e6cd455b9cea22780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=B0=AC?= Date: Sun, 24 Aug 2025 09:51:53 +0900 Subject: [PATCH 2/7] =?UTF-8?q?feat:=20=EC=88=98=EC=A0=95=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EB=B2=84=ED=8A=BC=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=EB=A5=BC=20client=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=EB=A1=9C=20=EC=84=A0=EC=96=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/[id]/[repo]/[slug]/page.tsx | 18 ++++++++------ .../src/components/Post/PostButtons.tsx | 24 +++++++++++++++++++ 2 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 gitmon-client/src/components/Post/PostButtons.tsx diff --git a/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx b/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx index 91c75ee..aef2752 100644 --- a/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx +++ b/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx @@ -9,6 +9,7 @@ import MarkdownRenderer from '@components/MarkdownRenderer' import { ShareButton } from '@components/ShareButton' import { LikeButton } from '@components/LikeButton' import { cookies } from 'next/headers' +import { PostButtons } from '@components/Post/PostButtons' export default async function BlogPost({ params, @@ -70,17 +71,20 @@ export default async function BlogPost({

{post.title}

-
-
- - -
+
+
+
+ + +
{'3'} comments
+
+
diff --git a/gitmon-client/src/components/Post/PostButtons.tsx b/gitmon-client/src/components/Post/PostButtons.tsx new file mode 100644 index 0000000..7674dcb --- /dev/null +++ b/gitmon-client/src/components/Post/PostButtons.tsx @@ -0,0 +1,24 @@ +'use client' + +import { Button } from '@components/ui' +import React from 'react' + +export const PostButtons = () => { + + const handleUpdate = () => { + console.log('update') + } + + const handleDelete = () => { + const confirm = window.confirm('정말 삭제하시겠습니까?') + if (confirm) { + console.log('delete') + } + } + return ( +
+ + +
+ ) +} From 8be1e3b2ef9f338ff92d91ba47cdd96380afb83b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=B0=AC?= Date: Sun, 24 Aug 2025 09:52:08 +0900 Subject: [PATCH 3/7] =?UTF-8?q?chore:=20=EC=97=85=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8=20=ED=99=94=EB=A9=B4=20=EA=B5=AC=EC=84=B1=EC=9D=84=20?= =?UTF-8?q?=EC=9C=84=ED=95=B4=20create-post=20=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=20=EB=B3=B5=EB=B6=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gitmon-client/src/app/update-post/AddPost.tsx | 97 +++++++++++++++++++ gitmon-client/src/app/update-post/page.tsx | 7 ++ 2 files changed, 104 insertions(+) create mode 100644 gitmon-client/src/app/update-post/AddPost.tsx create mode 100644 gitmon-client/src/app/update-post/page.tsx diff --git a/gitmon-client/src/app/update-post/AddPost.tsx b/gitmon-client/src/app/update-post/AddPost.tsx new file mode 100644 index 0000000..bea475e --- /dev/null +++ b/gitmon-client/src/app/update-post/AddPost.tsx @@ -0,0 +1,97 @@ +'use client' + +import { useMutation } from '@tanstack/react-query' +import { useRouter } from 'next/navigation' +import { toast } from 'sonner' + +import { PostForm } from '@components/Post' +import matter from 'gray-matter' +import { titleToSlug } from '@lib/utils' +import { PostMeta } from '@lib/types' +import { useState } from 'react' + +export default function AddPost({ token }: { token: string | null }) { + const router = useRouter() + const [user, setUser] = useState<{ id: string; repo: string }>() + + const { mutate } = useMutation({ + mutationFn: async ({ title, blob }: { title: string; blob: Blob }) => { + const body = new FormData() + const fileName = titleToSlug(title) + body.append('title', fileName) + body.append('content', blob, fileName) + + const response = await fetch(`${process.env.NEXT_PUBLIC_API_DOMAIN}/api/v1/posting`, { + method: 'POST', + headers: { + Authorization: `Bearer ${token}`, + }, + body, + }) + + if (!response.ok) { + toast('게시글 저장에 실패했습니다.') + throw new Error('게시글 저장 실패') + } + return response + }, + onSuccess: async (res, {}) => { + const { data } = await res.json() + + toast('게시글이 저장되었습니다.') + router.push(`/${user?.id}/${user?.repo}/${data.id}`) + }, + }) + + const handleSavePost = async ({ title, content }: { title: string; content: string }) => { + const res = await fetch(`${process.env.NEXT_PUBLIC_API_DOMAIN}/api/v1/member`, { + method: 'GET', + headers: { + Authorization: `Bearer ${token}`, + 'Content-Type': 'application/json', + }, + }) + + if (!res.ok) { + toast('사용자 정보를 가져오는 데 실패했습니다.') + return + } + + const { data } = await res.json() + setUser({ id: data.githubUsername, repo: data.repoName }) + + if (!data.githubUsername || !data.repoName) { + toast('레포지토리 정보가 없습니다. 먼저 레포지토리를 설정해주세요.') + return + } + + if (!title) { + toast('게시글 제목을 입력해주세요.') + return + } + + const metadata: PostMeta = { + title: title.trim(), + slug: titleToSlug(title), + repo: data.repoName, + excerpt: content.slice(0, 100), + coverImage: '', + createdAt: new Date().toISOString(), + updatedAt: new Date().toISOString(), + pinned: false, + tags: [], + author: data.githubUsername, + } + + const markdown = matter.stringify(content, metadata) + const blob = new Blob([markdown], { type: 'text/markdown' }) + + mutate({ title, blob }) + } + + return ( +
+ +
+ ) +} diff --git a/gitmon-client/src/app/update-post/page.tsx b/gitmon-client/src/app/update-post/page.tsx new file mode 100644 index 0000000..8eaec6b --- /dev/null +++ b/gitmon-client/src/app/update-post/page.tsx @@ -0,0 +1,7 @@ +import { cookies } from 'next/headers' +import AddPost from './AddPost' + +export default async function Page() { + const token = (await cookies()).get('github_token')?.value ?? null + return +} From 2e696028edb3cb346cd0fc5c4d8ae9e202c8c0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=B0=AC?= Date: Sun, 24 Aug 2025 09:58:34 +0900 Subject: [PATCH 4/7] =?UTF-8?q?fix:=20=EC=88=98=EC=A0=95=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=EC=97=90=20=EC=A0=81=EC=A0=88=ED=95=9C=20route=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx | 2 +- .../[repo]/[slug]/update/UpdatePost.tsx} | 3 ++- .../[repo]/[slug]/update}/page.tsx | 4 ++-- gitmon-client/src/components/Post/PostButtons.tsx | 12 ++++++++++-- 4 files changed, 15 insertions(+), 6 deletions(-) rename gitmon-client/src/app/{update-post/AddPost.tsx => [id]/[repo]/[slug]/update/UpdatePost.tsx} (94%) rename gitmon-client/src/app/{update-post => [id]/[repo]/[slug]/update}/page.tsx (66%) diff --git a/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx b/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx index aef2752..0ee1b14 100644 --- a/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx +++ b/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx @@ -84,7 +84,7 @@ export default async function BlogPost({ {'3'} comments
- + diff --git a/gitmon-client/src/app/update-post/AddPost.tsx b/gitmon-client/src/app/[id]/[repo]/[slug]/update/UpdatePost.tsx similarity index 94% rename from gitmon-client/src/app/update-post/AddPost.tsx rename to gitmon-client/src/app/[id]/[repo]/[slug]/update/UpdatePost.tsx index bea475e..73eed54 100644 --- a/gitmon-client/src/app/update-post/AddPost.tsx +++ b/gitmon-client/src/app/[id]/[repo]/[slug]/update/UpdatePost.tsx @@ -10,11 +10,12 @@ import { titleToSlug } from '@lib/utils' import { PostMeta } from '@lib/types' import { useState } from 'react' -export default function AddPost({ token }: { token: string | null }) { +export default function UpdatePost({ token }: { token: string | null }) { const router = useRouter() const [user, setUser] = useState<{ id: string; repo: string }>() const { mutate } = useMutation({ + // 해당 부분을 업데이트치는 API 호출로 변경해야 함 mutationFn: async ({ title, blob }: { title: string; blob: Blob }) => { const body = new FormData() const fileName = titleToSlug(title) diff --git a/gitmon-client/src/app/update-post/page.tsx b/gitmon-client/src/app/[id]/[repo]/[slug]/update/page.tsx similarity index 66% rename from gitmon-client/src/app/update-post/page.tsx rename to gitmon-client/src/app/[id]/[repo]/[slug]/update/page.tsx index 8eaec6b..19aecaf 100644 --- a/gitmon-client/src/app/update-post/page.tsx +++ b/gitmon-client/src/app/[id]/[repo]/[slug]/update/page.tsx @@ -1,7 +1,7 @@ import { cookies } from 'next/headers' -import AddPost from './AddPost' +import UpdatePost from './UpdatePost' export default async function Page() { const token = (await cookies()).get('github_token')?.value ?? null - return + return } diff --git a/gitmon-client/src/components/Post/PostButtons.tsx b/gitmon-client/src/components/Post/PostButtons.tsx index 7674dcb..a874888 100644 --- a/gitmon-client/src/components/Post/PostButtons.tsx +++ b/gitmon-client/src/components/Post/PostButtons.tsx @@ -1,12 +1,20 @@ 'use client' import { Button } from '@components/ui' +import { useRouter } from 'next/navigation' import React from 'react' -export const PostButtons = () => { +interface PostButtonsProps { + id: string + repo: string + slug: string +} + +export const PostButtons = ({ id, repo, slug }: PostButtonsProps) => { + const router = useRouter() const handleUpdate = () => { - console.log('update') + router.push(`/@${id}/${repo}/${slug}/update`) } const handleDelete = () => { From 2ff56bbba94ec477e6f0645841b5470ec68fbaf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=B0=AC?= Date: Sun, 24 Aug 2025 10:13:17 +0900 Subject: [PATCH 5/7] =?UTF-8?q?feat:=20=EC=88=98=EC=A0=95=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=EC=97=90=20API=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../[id]/[repo]/[slug]/update/UpdatePost.tsx | 14 ++++--- .../app/[id]/[repo]/[slug]/update/page.tsx | 41 ++++++++++++++++++- .../src/components/Post/PostForm.tsx | 9 ++-- 3 files changed, 54 insertions(+), 10 deletions(-) diff --git a/gitmon-client/src/app/[id]/[repo]/[slug]/update/UpdatePost.tsx b/gitmon-client/src/app/[id]/[repo]/[slug]/update/UpdatePost.tsx index 73eed54..d5bdee0 100644 --- a/gitmon-client/src/app/[id]/[repo]/[slug]/update/UpdatePost.tsx +++ b/gitmon-client/src/app/[id]/[repo]/[slug]/update/UpdatePost.tsx @@ -1,19 +1,22 @@ 'use client' import { useMutation } from '@tanstack/react-query' -import { useRouter } from 'next/navigation' +import { useParams, useRouter } from 'next/navigation' import { toast } from 'sonner' import { PostForm } from '@components/Post' import matter from 'gray-matter' import { titleToSlug } from '@lib/utils' -import { PostMeta } from '@lib/types' +import { Post, PostMeta } from '@lib/types' import { useState } from 'react' -export default function UpdatePost({ token }: { token: string | null }) { +export default function UpdatePost({ token, post }: { token: string | null, post: Omit }) { const router = useRouter() + const { slug } = useParams() const [user, setUser] = useState<{ id: string; repo: string }>() + console.log(slug) + const { mutate } = useMutation({ // 해당 부분을 업데이트치는 API 호출로 변경해야 함 mutationFn: async ({ title, blob }: { title: string; blob: Blob }) => { @@ -21,9 +24,10 @@ export default function UpdatePost({ token }: { token: string | null }) { const fileName = titleToSlug(title) body.append('title', fileName) body.append('content', blob, fileName) + body.append('id', slug as string) const response = await fetch(`${process.env.NEXT_PUBLIC_API_DOMAIN}/api/v1/posting`, { - method: 'POST', + method: 'PUT', headers: { Authorization: `Bearer ${token}`, }, @@ -92,7 +96,7 @@ export default function UpdatePost({ token }: { token: string | null }) { return (
- +
) } diff --git a/gitmon-client/src/app/[id]/[repo]/[slug]/update/page.tsx b/gitmon-client/src/app/[id]/[repo]/[slug]/update/page.tsx index 19aecaf..6eb3857 100644 --- a/gitmon-client/src/app/[id]/[repo]/[slug]/update/page.tsx +++ b/gitmon-client/src/app/[id]/[repo]/[slug]/update/page.tsx @@ -1,7 +1,44 @@ +import Link from 'next/link'; import { cookies } from 'next/headers' + import UpdatePost from './UpdatePost' +import { replaceId } from '@lib/utils'; +import { fetchPost } from '@lib/github'; -export default async function Page() { +export default async function Page({ + params, +}: { + params: Promise<{ slug: string; id: string; repo: string }> +}) { + const { id, repo, slug } = await params const token = (await cookies()).get('github_token')?.value ?? null - return + + + const res = await fetch( + `${process.env.NEXT_PUBLIC_API_DOMAIN}/api/v1/posting/github/${replaceId(id)}/${slug}`, + { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }, + ) + + const { data } = await res.json() + + if (!data?.githubDownloadUrl) { + return ( +
+ 해당 포스트를 찾을 수 없습니다.
+ + 다른 포스트 보기 + +
+ ) + } + const post = await fetchPost(data?.githubDownloadUrl) + + + return } diff --git a/gitmon-client/src/components/Post/PostForm.tsx b/gitmon-client/src/components/Post/PostForm.tsx index e2e3d69..80f5892 100644 --- a/gitmon-client/src/components/Post/PostForm.tsx +++ b/gitmon-client/src/components/Post/PostForm.tsx @@ -26,15 +26,18 @@ import { } from 'lucide-react' import Link from 'next/link' import { useParams } from 'next/navigation' +import { Post } from '@lib/types' interface PostFormProps { onPostSaved: (post: { title: string; content: string }) => void + post: Omit } -export function PostForm({ onPostSaved }: PostFormProps) { + +export function PostForm({ onPostSaved, post }: PostFormProps) { const params = useParams() - const [title, setTitle] = useState('') - const [content, setContent] = useState('') + const [title, setTitle] = useState(post?.title || '') + const [content, setContent] = useState(post?.content || '') const [showImageUploader, setShowImageUploader] = useState(false) const textareaRef = useRef(null) From 4808f0302a394c49f3736edea66f1e8dd659d86e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=B0=AC?= Date: Sun, 24 Aug 2025 11:25:48 +0900 Subject: [PATCH 6/7] =?UTF-8?q?chore:=20=EB=A6=B0=ED=8A=B8=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=EC=88=98=EC=A0=95=20(=EC=B6=94=ED=9B=84=EC=97=90?= =?UTF-8?q?=20=EC=84=A4=EC=A0=95=20=ED=99=95=EC=9D=B8=ED=95=A0=20=EA=B2=83?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/[id]/[repo]/[slug]/page.tsx | 8 ++--- .../[id]/[repo]/[slug]/update/UpdatePost.tsx | 10 ++++-- .../app/[id]/[repo]/[slug]/update/page.tsx | 8 ++--- .../src/components/Post/PostButtons.tsx | 32 +++++++++++-------- .../src/components/Post/PostForm.tsx | 1 - 5 files changed, 33 insertions(+), 26 deletions(-) diff --git a/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx b/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx index 0ee1b14..9a0f479 100644 --- a/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx +++ b/gitmon-client/src/app/[id]/[repo]/[slug]/page.tsx @@ -79,10 +79,10 @@ export default async function BlogPost({ {post.createdAt ? formatDate(post.createdAt) : 'Unknown date'} -
- - {'3'} comments -
+
+ + {'3'} comments +
diff --git a/gitmon-client/src/app/[id]/[repo]/[slug]/update/UpdatePost.tsx b/gitmon-client/src/app/[id]/[repo]/[slug]/update/UpdatePost.tsx index d5bdee0..96bf796 100644 --- a/gitmon-client/src/app/[id]/[repo]/[slug]/update/UpdatePost.tsx +++ b/gitmon-client/src/app/[id]/[repo]/[slug]/update/UpdatePost.tsx @@ -1,5 +1,7 @@ 'use client' +import { useState } from 'react' + import { useMutation } from '@tanstack/react-query' import { useParams, useRouter } from 'next/navigation' import { toast } from 'sonner' @@ -8,9 +10,13 @@ import { PostForm } from '@components/Post' import matter from 'gray-matter' import { titleToSlug } from '@lib/utils' import { Post, PostMeta } from '@lib/types' -import { useState } from 'react' -export default function UpdatePost({ token, post }: { token: string | null, post: Omit }) { +interface UpdatePostProps { + token: string | null + post: Omit +} + +export default function UpdatePost({ token, post }: UpdatePostProps) { const router = useRouter() const { slug } = useParams() const [user, setUser] = useState<{ id: string; repo: string }>() diff --git a/gitmon-client/src/app/[id]/[repo]/[slug]/update/page.tsx b/gitmon-client/src/app/[id]/[repo]/[slug]/update/page.tsx index 6eb3857..8553c42 100644 --- a/gitmon-client/src/app/[id]/[repo]/[slug]/update/page.tsx +++ b/gitmon-client/src/app/[id]/[repo]/[slug]/update/page.tsx @@ -1,9 +1,9 @@ -import Link from 'next/link'; +import Link from 'next/link' import { cookies } from 'next/headers' import UpdatePost from './UpdatePost' -import { replaceId } from '@lib/utils'; -import { fetchPost } from '@lib/github'; +import { replaceId } from '@lib/utils' +import { fetchPost } from '@lib/github' export default async function Page({ params, @@ -13,7 +13,6 @@ export default async function Page({ const { id, repo, slug } = await params const token = (await cookies()).get('github_token')?.value ?? null - const res = await fetch( `${process.env.NEXT_PUBLIC_API_DOMAIN}/api/v1/posting/github/${replaceId(id)}/${slug}`, { @@ -39,6 +38,5 @@ export default async function Page({ } const post = await fetchPost(data?.githubDownloadUrl) - return } diff --git a/gitmon-client/src/components/Post/PostButtons.tsx b/gitmon-client/src/components/Post/PostButtons.tsx index a874888..09efab3 100644 --- a/gitmon-client/src/components/Post/PostButtons.tsx +++ b/gitmon-client/src/components/Post/PostButtons.tsx @@ -5,28 +5,32 @@ import { useRouter } from 'next/navigation' import React from 'react' interface PostButtonsProps { - id: string - repo: string - slug: string + id: string + repo: string + slug: string } export const PostButtons = ({ id, repo, slug }: PostButtonsProps) => { - const router = useRouter() + const router = useRouter() - const handleUpdate = () => { - router.push(`/@${id}/${repo}/${slug}/update`) - } + const handleUpdate = () => { + router.push(`/@${id}/${repo}/${slug}/update`) + } - const handleDelete = () => { - const confirm = window.confirm('정말 삭제하시겠습니까?') - if (confirm) { - console.log('delete') - } + const handleDelete = () => { + const confirm = window.confirm('정말 삭제하시겠습니까?') + if (confirm) { + console.log('delete') } + } return (
- - + +
) } diff --git a/gitmon-client/src/components/Post/PostForm.tsx b/gitmon-client/src/components/Post/PostForm.tsx index 80f5892..5e51360 100644 --- a/gitmon-client/src/components/Post/PostForm.tsx +++ b/gitmon-client/src/components/Post/PostForm.tsx @@ -33,7 +33,6 @@ interface PostFormProps { post: Omit } - export function PostForm({ onPostSaved, post }: PostFormProps) { const params = useParams() const [title, setTitle] = useState(post?.title || '') From 17e84c1b8a78c17764877aefe0db0c145fffe881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=B0=AC?= Date: Sun, 24 Aug 2025 11:27:26 +0900 Subject: [PATCH 7/7] =?UTF-8?q?fix:=20=EB=88=84=EB=9D=BD=EB=90=9C=20option?= =?UTF-8?q?al=20interface=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gitmon-client/src/components/Post/PostForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitmon-client/src/components/Post/PostForm.tsx b/gitmon-client/src/components/Post/PostForm.tsx index 5e51360..758477b 100644 --- a/gitmon-client/src/components/Post/PostForm.tsx +++ b/gitmon-client/src/components/Post/PostForm.tsx @@ -30,7 +30,7 @@ import { Post } from '@lib/types' interface PostFormProps { onPostSaved: (post: { title: string; content: string }) => void - post: Omit + post?: Omit } export function PostForm({ onPostSaved, post }: PostFormProps) {