From 961dc3c8e08b3c1d8c2e701517e90a4bd4cf3cc4 Mon Sep 17 00:00:00 2001 From: shinhyojeong Date: Tue, 30 Jan 2024 01:09:07 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20login=EC=8B=9C=20=EC=A0=9C=EC=95=88,=20?= =?UTF-8?q?=EC=A2=8B=EC=95=84=EC=9A=94=20=EC=95=88=EB=B3=B4=EC=9D=B4?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/post/PriceOfferCard/index.tsx | 62 +++++++++++--------- src/components/post/PriceOfferCard/styled.ts | 22 ++----- 2 files changed, 39 insertions(+), 45 deletions(-) diff --git a/src/components/post/PriceOfferCard/index.tsx b/src/components/post/PriceOfferCard/index.tsx index e427f314..97323a5f 100644 --- a/src/components/post/PriceOfferCard/index.tsx +++ b/src/components/post/PriceOfferCard/index.tsx @@ -52,7 +52,7 @@ const PriceOfferCard = ({ const offerDisabled = getPostOffersQuery.data?.offerCountOfCurrentMember === - getPostOffersQuery.data?.maximumOfferCount || !isLogin + getPostOffersQuery.data?.maximumOfferCount useEffect(() => { setLikePost({ @@ -198,34 +198,38 @@ const PriceOfferCard = ({ )} - - - - {likePost.status ? ( - - ) : ( - - )} - {likePost.count} - - {isSeller ? ( - - 쪽지하기 - - ) : ( - { - offerModal.openModal() - }}>{`가격 제안하기(${ - getPostOffersQuery.data?.offerCountOfCurrentMember || 0 - }/2)`} - )} - + {isLogin && ( + <> + + + + {likePost.status ? ( + + ) : ( + + )} + {likePost.count} + + {isSeller ? ( + + 쪽지하기 + + ) : ( + { + offerModal.openModal() + }}>{`가격 제안하기(${ + getPostOffersQuery.data?.offerCountOfCurrentMember || 0 + }/2)`} + )} + + + )} `solid 1px ${theme.colors.grayScale20}`}; + ${({ theme }) => + css` + border: solid 1px ${theme.colors.grayScale20}; - cursor: pointer; - - &:disabled { - ${({ theme }) => - css` - background-color: ${theme.colors.grayScale20}; - - color: ${theme.colors.white}; + background-color: ${theme.colors.white}; + `}; - svg { - color: ${theme.colors.white}; - } - `}; - - cursor: default; - } + cursor: pointer; ${({ theme }): string => ` ${theme.mediaQuery.tablet} {