From c9d9d3e38f0107514d633a7217a132b1a194f502 Mon Sep 17 00:00:00 2001 From: chaem03 Date: Sat, 16 Nov 2024 02:55:12 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]-=EC=9D=B8=EC=8A=A4=ED=83=80=20=20url=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=20=ED=94=BD=EC=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/nuguPatch/NuguPatch.jsx | 28 +++++++++++----------- src/pages/nuguPatch/_hooks/useNuguPatch.js | 7 +++--- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/pages/nuguPatch/NuguPatch.jsx b/src/pages/nuguPatch/NuguPatch.jsx index aef6994..36a7b88 100644 --- a/src/pages/nuguPatch/NuguPatch.jsx +++ b/src/pages/nuguPatch/NuguPatch.jsx @@ -22,20 +22,20 @@ export const NuguPatch = () => { const fetchUserData = async () => { try { const userData = await getNugu(); - if (userData.insta_url) { - const instaUsername = userData.insta_url.replace( - "https://www.instagram.com/", - "" - ); - console.log("instaUsername", instaUsername); - setUpdateData({ - ...userData, - insta_url: instaUsername, - }); - console.log("updateData", updateData); - } else { - setUpdateData(userData); - } + // if (userData.insta_url) { + // const instaUsername = userData.insta_url.replace( + // "https://www.instagram.com/", + // "" + // ); + // console.log("instaUsername", instaUsername); + // setUpdateData({ + // ...userData, + // insta_url: instaUsername, + // }); + // console.log("updateData", updateData); + // } else { + setUpdateData(userData); + // } } catch (err) { console.error("Patch-user정보 가져오기 실패", err); } diff --git a/src/pages/nuguPatch/_hooks/useNuguPatch.js b/src/pages/nuguPatch/_hooks/useNuguPatch.js index 7a70b68..b984200 100644 --- a/src/pages/nuguPatch/_hooks/useNuguPatch.js +++ b/src/pages/nuguPatch/_hooks/useNuguPatch.js @@ -37,9 +37,10 @@ export const useNuguPatch = () => { nickname: updateData.nickname, mbti: updateData.mbti, org: updateData.org, - insta_url: insta_url - ? `https://www.instagram.com/${updateData.insta_url}` - : "", + // insta_url: updateData.insta_url + // ? `https://www.instagram.com/${updateData.insta_url}` + // : "", + insta_url: updateData.insta_url, intro: updateData.intro, keyword1: updateData.keyword1, keyword2: updateData.keyword2,