From 2fb5771afd89dbdb77383f287a0b754c36c44bbf Mon Sep 17 00:00:00 2001 From: chaeyoungwon Date: Mon, 30 Sep 2024 17:53:34 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=92=84=20Add=20default=20placeholder?= =?UTF-8?q?=20and=20fix=20notion=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #270 placeholder 지정 및 노션 Uri 에러 수정 --- .../src/pages/Portfolio/MakePortfolio.jsx | 28 ++++++++----------- .../src/pages/Portfolio/UsePortfolio.jsx | 17 ++++++----- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/gongjakso/src/pages/Portfolio/MakePortfolio.jsx b/gongjakso/src/pages/Portfolio/MakePortfolio.jsx index 716ba6aa..83a9d8c3 100644 --- a/gongjakso/src/pages/Portfolio/MakePortfolio.jsx +++ b/gongjakso/src/pages/Portfolio/MakePortfolio.jsx @@ -24,8 +24,8 @@ const MakePortfolio = ({ portfolioId }) => { { id: uuidv4(), schoolName: '', - gradeStatus: '1학년', - state: '재학 중', + gradeStatus: '', + state: '', }, ]); const [careerSections, setCareerSections] = useState([ @@ -38,7 +38,7 @@ const MakePortfolio = ({ portfolioId }) => { }, ]); const [activitySections, setActivitySections] = useState([ - { id: uuidv4(), activityName: '', activityStatus: '활동 중' }, + { id: uuidv4(), activityName: '', activityStatus: '' }, ]); const [awardSections, setAwardSections] = useState([ { id: uuidv4(), competitionName: '', award: '' }, @@ -138,16 +138,16 @@ const MakePortfolio = ({ portfolioId }) => { portfolioData.educationList.length ? portfolioData.educationList.map(section => ({ schoolName: section.school || '', - gradeStatus: section.grade || '1학년', - state: section.state || '재학 중', + gradeStatus: section.grade || '', + state: section.state || '', id: uuidv4(), })) : [ { id: uuidv4(), schoolName: '', - gradeStatus: '1학년', - state: '재학 중', + gradeStatus: '', + state: '', }, ], ); @@ -187,7 +187,7 @@ const MakePortfolio = ({ portfolioId }) => { { id: uuidv4(), activityName: '', - activityStatus: '활동 중', + activityStatus: '', }, ], ); @@ -369,10 +369,7 @@ const MakePortfolio = ({ portfolioId }) => { { const updatedSections = [ @@ -389,9 +386,7 @@ const MakePortfolio = ({ portfolioId }) => { { const updatedSections = [ @@ -569,8 +564,7 @@ const MakePortfolio = ({ portfolioId }) => { id={`Activitystatus-${index}`} selectOptions={activityStatus_options} placeholder={ - section.activityStatus || - activityStatus_options[0] + section.activityStatus || '활동 상태' } value={section.activityStatus || ''} onChange={value => { diff --git a/gongjakso/src/pages/Portfolio/UsePortfolio.jsx b/gongjakso/src/pages/Portfolio/UsePortfolio.jsx index d97d955c..d70a9383 100644 --- a/gongjakso/src/pages/Portfolio/UsePortfolio.jsx +++ b/gongjakso/src/pages/Portfolio/UsePortfolio.jsx @@ -28,9 +28,8 @@ const UsePortfolio = () => { const fileData = fileResponse?.data?.data; const notionData = notionResponse?.data?.data; - // 파일과 노션 데이터 상태에 저장 - if (fileData) { + if (fileData && fileData.fileUri) { const fileName = fileData.fileUri .split('/') .pop() @@ -41,9 +40,10 @@ const UsePortfolio = () => { uri: fileData.fileUri, }); } - - if (notionData) { + if (notionData && notionData.notionUri) { setSnsLink(notionData.notionUri || ''); + } else { + console.log('No Notion URI found'); } } catch (error) { console.error( @@ -52,8 +52,9 @@ const UsePortfolio = () => { ); } }; - - fetchPortfolio(); + if (id) { + fetchPortfolio(); + } getMyInfo().then(response => { setProfileData(response?.data); }); @@ -192,7 +193,9 @@ const UsePortfolio = () => { setSnsLink(e.target.value)} /> From 35fdc7174eae87de1bc73699f76b58adc9f4e4fb Mon Sep 17 00:00:00 2001 From: chaeyoungwon Date: Mon, 30 Sep 2024 17:59:52 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=92=84=20Edit=20profile=20subtitle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #270 프로필페이지 팀박스 타이틀명 수정 --- gongjakso/src/pages/ProfilePage/ProfilePage.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gongjakso/src/pages/ProfilePage/ProfilePage.jsx b/gongjakso/src/pages/ProfilePage/ProfilePage.jsx index e71ccc85..903dd1ec 100644 --- a/gongjakso/src/pages/ProfilePage/ProfilePage.jsx +++ b/gongjakso/src/pages/ProfilePage/ProfilePage.jsx @@ -547,7 +547,7 @@ const ProfilePage = () => { )} - 내가 모집 중인 팀 + 나의 모집 기록 {postContent1?.map(post => ( { - 내가 지원한 팀 + 나의 지원 기록 @@ -580,7 +580,7 @@ const ProfilePage = () => { - 내가 참여한 공모전 + 나의 참여 기록