diff --git a/client/src/app/[blogName]/home/[categoryId]/[postId]/page.tsx b/client/src/app/[blogName]/home/[categoryId]/[postId]/page.tsx index 5a4046a..185972e 100644 --- a/client/src/app/[blogName]/home/[categoryId]/[postId]/page.tsx +++ b/client/src/app/[blogName]/home/[categoryId]/[postId]/page.tsx @@ -210,12 +210,18 @@ const page = ({ params }: { params: { blogName: string; categoryId: string; post router.push(`/${params.blogName}`)} /> - - - - + {post?.isAuthor && ( + <> + + + + + + )} @@ -223,6 +229,7 @@ const page = ({ params }: { params: { blogName: string; categoryId: string; post - {unPosted?.prUnPostedDtos?.prUnPostedDtos?.map((unPost) => { - return ( - - - - - #{unPost.prId} - - + {unPosted?.isAuthor && + unPosted?.prUnPostedDtos?.prUnPostedDtos?.map((unPost) => { + return ( + - {unPost.prTitle} + sx={{ + transition: 'all .35s ease-in-out', + cursor: 'pointer', + ':hover': { transform: 'translateY(-4px)' }, + }} + minWidth="220px" + height="124px" + bgcolor="primary.main" + p={4} + borderRadius="8px" + justifyContent="space-around"> + + + #{unPost.prId} + + + + {unPost.prTitle} + - - - ); - }) ?? ( - - - - - - 모든 PR 글 작성을 완료하셨습니다. - - - )} + + ); + })} 작성한 PR 목록 diff --git a/client/src/components/DND/DragAndDrop.tsx b/client/src/components/DND/DragAndDrop.tsx index 6cae261..7db5d9c 100644 --- a/client/src/components/DND/DragAndDrop.tsx +++ b/client/src/components/DND/DragAndDrop.tsx @@ -14,6 +14,7 @@ import PageLink from '../PageLink/PageLink'; import Github from '../Github/Github'; import Button from '../Button/Button'; import CreateCategoryModal from './CreateCategoryModal'; +import { IPostContent } from '@/types/dto'; type Footprint = { categoryId: number; @@ -30,9 +31,10 @@ interface DragAndDropProps { rightContainer: ReactNode; footprintList?: Footprint[]; categoryNumber?: string; + post?: IPostContent; } -function DragAndDrop({ rightContainer, footprintList, blogName }: DragAndDropProps) { +function DragAndDrop({ rightContainer, footprintList, blogName, post }: DragAndDropProps) { const [isBrowser, setIsBrowser] = useState(false); const [categoryEditOpen, setCategoryEditOpen] = useState(false); const [createCategoryOpen, setCreateCategoryOpen] = useState(false); @@ -58,13 +60,15 @@ function DragAndDrop({ rightContainer, footprintList, blogName }: DragAndDropPro - + {post?.isAuthor && ( + + )} {footprintList?.map((category) => { return ( @@ -94,25 +98,29 @@ function DragAndDrop({ rightContainer, footprintList, blogName }: DragAndDropPro - { - setCategoryEditOpen(true); - setParamsCategoryId(category.categoryId); - }} - title="게시글 수정"> - - - - - - - - + {post?.isAuthor && ( + { + setCategoryEditOpen(true); + setParamsCategoryId(category.categoryId); + }} + title="게시글 수정"> - + - + )} + + + {post?.isAuthor && ( + + + + + + + + )} @@ -136,20 +144,22 @@ function DragAndDrop({ rightContainer, footprintList, blogName }: DragAndDropPro ) : ( - { - setOpen(true); - setCategoryId(category.categoryId); - }} - sx={{ - fontSize: '14px', - cursor: 'pointer', - ':hover': { color: 'rgba(0,0,0,0.4)' }, - }} - pl={4} - pt={1}> - PR 연동 하러가기 {'->'} - + post?.isAuthor && ( + { + setOpen(true); + setCategoryId(category.categoryId); + }} + sx={{ + fontSize: '14px', + cursor: 'pointer', + ':hover': { color: 'rgba(0,0,0,0.4)' }, + }} + pl={4} + pt={1}> + PR 연동 하러가기 {'->'} + + ) )} {!category?.isPrCategory && (