From b9ba124eccd83547939567e4ae855324ef45b774 Mon Sep 17 00:00:00 2001 From: Yang ga-hyeon Date: Thu, 20 Feb 2025 14:20:35 +0900 Subject: [PATCH 01/10] =?UTF-8?q?feat:=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85=20=ED=9B=84=20=ED=94=BC=EB=93=9C=EB=B0=B1=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/ProfileDreamer.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/features/ProfileDreamer.tsx b/src/features/ProfileDreamer.tsx index 45f03c4a..0902d15b 100644 --- a/src/features/ProfileDreamer.tsx +++ b/src/features/ProfileDreamer.tsx @@ -44,6 +44,7 @@ export default function ProfileDreamer() { }, onSuccess: () => { removeOAuthToken(); + alert("Dreamer님 가입을 축하드립니다!"); router.push("/login"); }, onError: (error: any) => { From eff5d0082879e77c37bd7417ccd31a2a9acfd6cc Mon Sep 17 00:00:00 2001 From: Yang ga-hyeon Date: Thu, 20 Feb 2025 14:33:11 +0900 Subject: [PATCH 02/10] =?UTF-8?q?feat:=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20?= =?UTF-8?q?=ED=83=9C=EB=B8=94=EB=A6=BF=EC=9D=BC=20=EB=95=8C=20=EA=B8=80?= =?UTF-8?q?=EC=9E=90=20=ED=81=AC=EA=B8=B0=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Landing/MapMarker.tsx | 58 +++++++++++++++------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/src/components/Landing/MapMarker.tsx b/src/components/Landing/MapMarker.tsx index 2c2d8c0a..e774c309 100644 --- a/src/components/Landing/MapMarker.tsx +++ b/src/components/Landing/MapMarker.tsx @@ -108,9 +108,11 @@ export default function MapMarker() { return ( <>
-

🛬 사용자 이용현황 🛬

+

+ 🛬 사용자 이용현황 🛬 +

-
+
{/* 지도 */}
{selectedRegion ? ( - <> -

{regionNames[selectedRegion.name]} 통계

+

{regionNames[selectedRegion.name]} 통계

총 서비스 수: {selectedRegion.totalCount}

- { selectedRegion.totalCount === 0 ? ( -
-

통계 자료가 없습니다!
여러분의 꿈을 추가해 보세요! 🚀

-
- ) : ( - - - {selectedRegion.details.map((entry, index) => ( - - ))} - - - - )} + {selectedRegion.totalCount === 0 ? ( +
+

+ 통계 자료가 없습니다! +
+ 여러분의 꿈을 추가해 보세요! 🚀 +

+
+ ) : ( + + + {selectedRegion.details.map((entry, index) => ( + + ))} + + + + )}

마커를 클릭하면 해당 지역 통계를 볼 수 있습니다.

- ) : (

마커를 클릭하면 해당 지역 통계를 볼 수 있습니다.

)} From b69b3a9e9cb68454bec1169398644318d4059b3e Mon Sep 17 00:00:00 2001 From: Yang ga-hyeon Date: Thu, 20 Feb 2025 14:45:07 +0900 Subject: [PATCH 03/10] =?UTF-8?q?feat:=20=EC=BD=94=EC=BD=94=EB=84=9B=20?= =?UTF-8?q?=EA=B0=9C=EC=88=98=20=EB=8F=99=EC=A0=81=20=EB=A0=8C=EB=8D=94?= =?UTF-8?q?=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Gnb/NavBar.tsx | 36 ++++++++++++++++++++++++++++++++--- src/stores/useAuthStore.tsx | 2 ++ 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/components/Gnb/NavBar.tsx b/src/components/Gnb/NavBar.tsx index cf03553c..863e22cb 100644 --- a/src/components/Gnb/NavBar.tsx +++ b/src/components/Gnb/NavBar.tsx @@ -57,8 +57,17 @@ const getNotification = () => { }; const NavBar = () => { - const { isLoggedIn, nickName, role, coconut, email, phoneNumber, profileImage, setLogin } = - useAuthStore(); + const { + isLoggedIn, + nickName, + role, + coconut, + setCoconut, + email, + phoneNumber, + profileImage, + setLogin, + } = useAuthStore(); const [isOpenSidebar, setIsOpenSidebar] = useState(false); const [isOpenNotification, setIsOpenNotification] = useState(false); const [isOpenUserMenu, setIsOpenUserMenu] = useState(false); @@ -201,13 +210,34 @@ const NavBar = () => { }; }, [isOpenUserMenu, isOpenNotification, isOpenSidebar]); + const handleCoconutChange = (newCoconut: number) => { + setCoconut(newCoconut); + }; + + useEffect(() => { + const fetchUserInfo = async () => { + try { + const userData = await userService.getUserInfo(); + setUserInfo(userData); + + if (userData.coconut !== coconut) { + handleCoconutChange(userData.coconut); + } + } catch (error) { + console.error(error); + } + }; + + fetchUserInfo(); + }, [coconut]); + const hasUnreadNotifications = notificationData.some((notification) => !notification.isRead); const hasNotifications = realTimeNotifications.length > 0; return (
-
+
니가가라하와이 로고 diff --git a/src/stores/useAuthStore.tsx b/src/stores/useAuthStore.tsx index 7ee3c136..7a106de0 100644 --- a/src/stores/useAuthStore.tsx +++ b/src/stores/useAuthStore.tsx @@ -20,6 +20,7 @@ interface AuthState { profileImage?: string, ) => void; setLogout: () => void; + setCoconut: (newCoconut: number) => void; } const useAuthStore = create()( @@ -50,6 +51,7 @@ const useAuthStore = create()( phoneNumber: "", profileImage: "", }), + setCoconut: (newCoconut: number) => set({ coconut: newCoconut }), }), { name: "auth", From d7e7f04115c044b33a2437dafbdf52483e82b623 Mon Sep 17 00:00:00 2001 From: Yang ga-hyeon Date: Thu, 20 Feb 2025 14:59:16 +0900 Subject: [PATCH 04/10] =?UTF-8?q?feat:=20=EB=A1=9C=EA=B7=B8=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/SystemLog.tsx | 172 +++++++++++++++++-------------------- src/styles/globals.css | 20 +++++ 2 files changed, 100 insertions(+), 92 deletions(-) diff --git a/src/features/SystemLog.tsx b/src/features/SystemLog.tsx index b2efed6f..2a6a1dbc 100644 --- a/src/features/SystemLog.tsx +++ b/src/features/SystemLog.tsx @@ -1,98 +1,86 @@ export default function MetricPage() { return (
-

네트워크 모니터링

- - - - - - - -

시스템 지표 모니터링

- - - - - - - - - - - +

네트워크 모니터링

+
+ + + + + + + +
+

+ 시스템 지표 모니터링 +

+
+ + + + + + + + + + + +
); } diff --git a/src/styles/globals.css b/src/styles/globals.css index b57f7130..81519de9 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -129,3 +129,23 @@ button { .recharts-layer :focus { outline: none; } + +.grid-container { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* 자동으로 컬럼을 채우도록 설정 */ + gap: 16px; /* 각 아이템 간의 간격 */ +} + +.iframe-item { + width: 100%; + height: 200px; + border: none; + border-radius: 8px; /* 둥근 테두리 */ + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 부드러운 그림자 */ +} + +@media (max-width: 768px) { + .iframe-item { + height: 150px; /* 모바일에서 iframe의 높이를 조금 줄임 */ + } +} From 413eda7b64d769b435d99072451ae5ab7abb7fb6 Mon Sep 17 00:00:00 2001 From: Yang ga-hyeon Date: Thu, 20 Feb 2025 15:21:43 +0900 Subject: [PATCH 05/10] =?UTF-8?q?feat:=20=EA=B3=B5=EC=9C=A0=ED=95=98?= =?UTF-8?q?=EA=B8=B0=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/DetailMaker.tsx | 52 ++++++++++++++---------------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/src/features/DetailMaker.tsx b/src/features/DetailMaker.tsx index 6ba16a52..2e39ff95 100644 --- a/src/features/DetailMaker.tsx +++ b/src/features/DetailMaker.tsx @@ -171,17 +171,18 @@ export default function RequestDetailDreamer() { }, [isPlaceholderData, currentPage, itemsPerPage, totalItems, makerId, queryClient]); const handleKakaoShare = () => { + if (typeof window === "undefined") return; + const currentUrl = window.location.href; - if (typeof window !== "undefined" && window.Kakao) { - const Kakao = window.Kakao; - Kakao.Share.createDefaultButton({ - container: "#kakaotalk-sharing-btn", + if (window.Kakao) { + window.Kakao.Share.sendDefault({ objectType: "feed", content: { - title: makerProfileInfo?.nickName || "Maker님", - description: makerProfileInfo?.description || "여행 플랜 상세내용보기", - imageUrl: - "https://scontent-ssn1-1.cdninstagram.com/v/t51.29350-15/440535983_1166519591460822_7666710914928913519_n.jpg?stp=dst-jpg_e35_s1080x1080_tt6&_nc_ht=scontent-ssn1-1.cdninstagram.com&_nc_cat=106&_nc_ohc=CzF6FbL6gvEQ7kNvgHzHfiF&_nc_gid=947375cfb83d43c5abb8aeacb63ed59a&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYDtqZ0h00aA8oATSGX48sg79D3ROGTLYUaZSjkcbYafCQ&oe=67A60D41&_nc_sid=d885a2", + title: makerProfileInfo?.nickName || "Maker님" + " Maker님", + description: makerProfileInfo?.description || "Maker의 설명", + imageUrl: "https://ifh.cc/g/wvkbqP.png", + imageWidth: 400, + imageHeight: 200, link: { mobileWebUrl: currentUrl, webUrl: currentUrl, @@ -190,6 +191,7 @@ export default function RequestDetailDreamer() { }); } }; + useEffect(() => { if (makerProfileInfo) { setIsFollowed(makerProfileInfo.isFollowed); @@ -197,23 +199,7 @@ export default function RequestDetailDreamer() { }, [makerProfileInfo]); const handleFacebookShare = () => { - if (typeof window !== "undefined" && window.FB) { - const shareUrl = `https://fs2-4-team2-go-for-me.vercel.app/maker-detail/${makerId}`; - - window.FB.ui( - { - method: "share", - href: shareUrl, - }, - (response) => { - if (response) { - alert("공유를 성공했습니다!"); - } else { - console.error("공유 실패 - URL:", shareUrl); - } - }, - ); - } + return window.open(`http://www.facebook.com/sharer/sharer.php?u=${location.href}`); }; const sharePromptContent = ( @@ -230,15 +216,17 @@ export default function RequestDetailDreamer() { ); return ( - <> +
{/* 왼쪽 열 */}
@@ -314,7 +302,7 @@ export default function RequestDetailDreamer() {
-
+
{sharePromptContent}
@@ -355,11 +343,11 @@ export default function RequestDetailDreamer() {
-

리뷰({makerProfileInfo?.totalReviews})

+

리뷰({makerProfileInfo?.totalReviews})

-

+

{makerProfileInfo?.averageRating}

/5

@@ -376,7 +364,7 @@ export default function RequestDetailDreamer() {
- {findMakerReview?.list && findMakerReview.list.length > 0 && ( + {findMakerReview?.list && findMakerReview.list.length > 0 && ( <> {findMakerReview?.list?.map((review, index) => (
From 717ca0a8e75704a283e05062bca1bfefe0a292aa Mon Sep 17 00:00:00 2001 From: Yang ga-hyeon Date: Thu, 20 Feb 2025 15:24:14 +0900 Subject: [PATCH 06/10] =?UTF-8?q?feat:=20=EC=B6=A9=EC=A0=84=20=ED=9B=84=20?= =?UTF-8?q?=EC=83=88=EB=A1=9C=EA=B3=A0=EC=B9=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Gnb/ChargeModal.tsx | 9 +++++---- src/features/DetailMaker.tsx | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Gnb/ChargeModal.tsx b/src/components/Gnb/ChargeModal.tsx index 11898b28..7de5ac48 100644 --- a/src/components/Gnb/ChargeModal.tsx +++ b/src/components/Gnb/ChargeModal.tsx @@ -45,6 +45,7 @@ export default function ChargeModal({ }); if (paymentStatus.status === "PAID") { setIsChargeModalOpen(false); + window.location.reload(); } }; const handleSubmit: FormEventHandler = async (e) => { @@ -116,7 +117,7 @@ export default function ChargeModal({ }; const isWaitingPayment = paymentStatus.status !== "IDLE"; - console.log('상태메세지',paymentStatus); + console.log("상태메세지", paymentStatus); return ( <> setIsChargeModalOpen(false)}> @@ -125,7 +126,7 @@ export default function ChargeModal({

현재 보유중인 코코넛

코코넛 -

{coconut}개

+

{coconut}개

@@ -177,7 +178,7 @@ export default function ChargeModal({

충전 갯수

{amount ? amount.toLocaleString() : 0}개 /

-

+

{amount ? (amount * 100).toLocaleString() : 0}원

@@ -195,7 +196,7 @@ export default function ChargeModal({ {(paymentStatus.status === "FAILED" || paymentStatus.status === "PAID") && (
-

+

{paymentStatus.status === "FAILED" ? "결제 실패" : "결제 성공"}

diff --git a/src/features/DetailMaker.tsx b/src/features/DetailMaker.tsx index 2e39ff95..729a4891 100644 --- a/src/features/DetailMaker.tsx +++ b/src/features/DetailMaker.tsx @@ -217,7 +217,6 @@ export default function RequestDetailDreamer() { return ( <> - {" "}