Skip to content

Commit

Permalink
Merge pull request #361 from SejongPeer/feature/19
Browse files Browse the repository at this point in the history
css : 마이페이지 수정된 css 1차
  • Loading branch information
kimjuyoung99 authored Jul 22, 2024
2 parents 7ee2b96 + 945cf65 commit 28f2a02
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 59 deletions.
155 changes: 105 additions & 50 deletions src/pages/myPage/mypage/MyPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,23 @@ const MyPage = () => {
};
// 로그아웃
const handleLogout = () => {
localStorage.removeItem('account');
localStorage.removeItem('grade');
localStorage.removeItem('gender');
localStorage.removeItem('major');
localStorage.removeItem('minor');
localStorage.removeItem('name');
localStorage.removeItem('nickname');
localStorage.removeItem('phoneNumber');
localStorage.removeItem('studentId');
localStorage.removeItem('accessToken');
localStorage.removeItem('refreshToken');
localStorage.removeItem('kakaoAccount');
localStorage.removeItem('pwd');
localStorage.removeItem('userId');
console.log('로그아웃 성공');
alert('로그아웃 되었습니다');
navigate('/main');
localStorage.removeItem('account');
localStorage.removeItem('grade');
localStorage.removeItem('gender');
localStorage.removeItem('major');
localStorage.removeItem('minor');
localStorage.removeItem('name');
localStorage.removeItem('nickname');
localStorage.removeItem('phoneNumber');
localStorage.removeItem('studentId');
localStorage.removeItem('accessToken');
localStorage.removeItem('refreshToken');
localStorage.removeItem('kakaoAccount');
localStorage.removeItem('pwd');
localStorage.removeItem('userId');
console.log('로그아웃 성공');
alert('로그아웃 되었습니다');
navigate('/main');
};

const gender = localStorage.getItem('gender');
Expand Down Expand Up @@ -132,7 +132,6 @@ const MyPage = () => {
} else {
statusHandler(data.data.status, data.data.matchingCompletedCount);
}

} catch (error) {
alert('에러가 발생했습니다.');
console.log(error.message);
Expand All @@ -141,42 +140,43 @@ const MyPage = () => {

//버디 - 상태에따른 처리
const statusHandler = (status, count) => {

//취소, 거절 패널티 해제
if (status === 'CANCEL'|| status === 'REACTIVATE') {
if (status === 'CANCEL' || status === 'REACTIVATE') {
if (count > 0) {
navigate('/buddy/success');
} else {
navigate('/buddy/start1');
}
// 거절 당함
} else if (status === "DENIED") {
// 거절 당함
} else if (status === 'DENIED') {
alert('상대방이 거절했습니다. 다시 신청해 주세요.');
if (count > 0) {
navigate('/buddy/success');
} else {
navigate('/buddy/start1');
}
//매칭 최종 완료
} else if (status === "MATCHING_COMPLETED") {
alert("매칭에 성공했습니다. 정보를 확인해주세요!")
navigate('/buddy/success')
//매칭 수락
} else if (status === "ACCEPT") {
alert("신청 수락을 했습니다. 상대방이 수락할때까지 기다려 주세요.");
//매칭 거절
} else if (status === "REJECT") {
alert("거절 패널티 1시간이 부과되었습니다. 1시간 이후에 다시 신청해 주세요.");
//매칭 중
} else if (status === "IN_PROGRESS") {
alert("매칭중입니다!");
//매칭 최종 완료
} else if (status === 'MATCHING_COMPLETED') {
alert('매칭에 성공했습니다. 정보를 확인해주세요!');
navigate('/buddy/success');
//매칭 수락
} else if (status === 'ACCEPT') {
alert('신청 수락을 했습니다. 상대방이 수락할때까지 기다려 주세요.');
//매칭 거절
} else if (status === 'REJECT') {
alert(
'거절 패널티 1시간이 부과되었습니다. 1시간 이후에 다시 신청해 주세요.'
);
//매칭 중
} else if (status === 'IN_PROGRESS') {
alert('매칭중입니다!');
navigate('/buddy/waiting');
//매칭 완료
//매칭 완료
} else if (status === 'FOUND_BUDDY') {
alert("버디를 찾았습니다!");
alert('버디를 찾았습니다!');
navigate('/buddy/accept');
}
}
};

//혼밥 매칭상대 확인
const HonbobHandler = async () => {
Expand Down Expand Up @@ -239,23 +239,44 @@ const MyPage = () => {
<div className={styles.outerContainer}>
<div className={styles.container1}>
<div className={styles.informTitleBox}>
<span className={styles.br}></span>
<p
style={{ fontWeight: '700', marginBottom: '0px' }}
className={styles.informTitle}
>
매칭정보
</p>
</div>

<div className={styles.matchingBox}>
{/* <button className={styles.matchingButton}>
<div className={styles.leftBox}>
<div className={`${styles.redWord} ${styles.checkWord}`}>세종스터디</div>
<div className={`${styles.blackWord} ${styles.checkWord}`} style={{ fontWeight: "700" }}>내 게시글 확인</div>
</div>
<div className={styles.rightImg}></div>
</button> */}
<button className={styles.hideBtn}></button>
<button className={styles.matchingButton}>
<div className={styles.leftBox}>
<div className={`${styles.redWord} ${styles.checkWord}`}>
지원한 스터디 확인
</div>
<div
className={`${styles.blackWord} ${styles.checkWord}`}
style={{ fontWeight: '700' }}
>
내가 지원한 스터디 현황 확인하기
</div>
</div>
<div className={styles.rightImg}></div>
</button>
<button className={styles.matchingButton}>
<div className={styles.leftBox}>
<div className={`${styles.redWord} ${styles.checkWord}`}>
내 스터디 게시글 관리
</div>
<div
className={`${styles.blackWord} ${styles.checkWord}`}
style={{ fontWeight: '700' }}
>
내가 업로드한 게시글, 신청자 관리하기
</div>
</div>
<div className={styles.rightImg}></div>
</button>
{/*<button className={styles.hideBtn}></button>*/}
<button
onClick={BuddyHandler}
className={styles.matchingButton}
Expand Down Expand Up @@ -292,6 +313,38 @@ const MyPage = () => {
</button>
</div>
</div>

<div className={styles.container5}>
<div className={styles.informTitleBox}>
<span className={styles.br}></span>
<p
style={{ fontWeight: '700', marginBottom: '0px' }}
className={styles.informTitle}
>
세종스터디
</p>
</div>

<div className={styles.matchingBox}>
<button className={styles.matchingButton}>
<div className={styles.leftBox}>
<div className={`${styles.redWord} ${styles.checkWord}`}>
좋아요 한 글
</div>
</div>
<div className={styles.rightImg}></div>
</button>
<button className={styles.matchingButton}>
<div className={styles.leftBox}>
<div className={`${styles.redWord} ${styles.checkWord}`}>
댓글 단 글
</div>
</div>
<div className={styles.rightImg}></div>
</button>
{/*<button className={styles.hideBtn}></button>*/}
</div>
</div>
<div className={styles.container2}>
<div className={styles.informTitleBox}>
<p style={{ fontWeight: '700', marginBottom: '0px' }}>
Expand Down Expand Up @@ -392,14 +445,16 @@ const MyPage = () => {
<div style={{ textDecoration: 'underline' }}>공지사항</div>
</div>
</div>
<button style={{ cursor: 'pointer', }} className={styles.logout} onClick={handleLogout}>
<button
style={{ cursor: 'pointer' }}
className={styles.logout}
onClick={handleLogout}
>
<p
style={{
fontWeight: '700',
fontSize: '1.3em',

}}

>
로그아웃
</p>
Expand Down
36 changes: 27 additions & 9 deletions src/pages/myPage/mypage/MyPage.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
width: 26vw;
display: flex;
justify-content: flex-start;
margin-top: 2vh;
}

.matchingBox {
Expand All @@ -54,7 +55,7 @@

.matchingButton {
cursor: pointer;
width: 26vw;
width: 28vw; /* 너비를 넓혔습니다 */
height: 9vh;
display: flex;
justify-content: space-between;
Expand Down Expand Up @@ -85,7 +86,7 @@
flex-direction: column;
align-items: center;
/* justify-content: left; */
width: 10vw;
width: 12vw; /* 너비를 넓혔습니다 */
gap: 1vh;
}

Expand All @@ -98,7 +99,7 @@
}

.checkWord {
width: 7vw;
width: 12vw; /* 너비를 넓혔습니다 */
text-align: left;
}

Expand Down Expand Up @@ -272,7 +273,7 @@
align-items: center;
flex-direction: column;
width: 100vw;
height: 100vh;
height: 100vh;
margin-top: 1vh;
}

Expand All @@ -290,9 +291,10 @@
width: 90vw;
display: flex;
align-items: center;
/* margin-top: 2vh; */
}
.informTitleBox p {
margin: 3% 0;
margin: 3% 40% 40% 0;
}

.matchingBox {
Expand All @@ -304,7 +306,7 @@
}

.matchingButton {
width: 90vw;
width: 95vw; /* 너비를 넓혔습니다 */
height: 9vh;
display: flex;
justify-content: space-between;
Expand Down Expand Up @@ -333,10 +335,11 @@
.leftBox {
display: flex;
flex-direction: column;
align-items: center;
align-items:self-start;
/* justify-content: left; */
width: 40vw;
width: 65vw; /* 너비를 넓혔습니다 */
gap: 1vh;
margin-left: 10px;
}

.redWord {
Expand All @@ -348,7 +351,7 @@
}

.checkWord {
width: 30vw;
width: 65vw; /* 너비를 넓혔습니다 */
text-align: left;
}

Expand Down Expand Up @@ -502,4 +505,19 @@
cursor: pointer;
margin: 3%;
}

.container5 {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #ffffff;
width: 100vw;
height: 30vh;
margin-top: 1vh;
}

/* .br {
margin-bottom: 0;
} */
}

0 comments on commit 28f2a02

Please sign in to comment.