-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #213 from YAPP-Github/dev
Release 0.1.17
- Loading branch information
Showing
17 changed files
with
166 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import { MatchingFail } from '@/assets/img'; | ||
import styled from 'styled-components'; | ||
|
||
function CancelBox() { | ||
return ( | ||
<> | ||
<> | ||
<MatchingImg src={MatchingFail} alt="매칭 실패 이미지" /> | ||
<StringEle> | ||
매칭이 성사되었으나 | ||
<br /> | ||
상대방이 서비스를 탈퇴하여 | ||
<br /> | ||
매칭이 취소되었습니다. | ||
<br /> | ||
지불하신 금액은 <strong>1영업일</strong> 이내 환불됩니다. | ||
</StringEle> | ||
<Actions> | ||
<ReviewLink | ||
href="https://docs.google.com/forms/d/e/1FAIpQLSeSnI-tB9acPtCepl-FM8cCTF-uezGOJ5SjwFOdQ6DT92xjmQ/viewform?usp=sf_link" | ||
target="_blank" | ||
> | ||
후기작성 | ||
</ReviewLink> | ||
<ReportLink | ||
href="https://docs.google.com/forms/d/e/1FAIpQLSfTSBwk6bb0ywTBoHu4cZM1gV8DN0OjMB4jVFvdzbYDrjnJdg/viewform?usp=sf_link" | ||
target="_blank" | ||
> | ||
신고하기 | ||
</ReportLink> | ||
</Actions> | ||
</> | ||
</> | ||
); | ||
} | ||
|
||
export const MatchingImg = styled.img` | ||
width: 140px; | ||
margin-bottom: 20px; | ||
`; | ||
export const StringEle = styled.p` | ||
line-height: 26px; | ||
`; | ||
|
||
export const Actions = styled.div` | ||
display: flex; | ||
margin-top: 18px; | ||
& > a { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-size: 12px; | ||
color: rgba(0, 0, 0, 0.6); | ||
width: 100%; | ||
height: 28px; | ||
} | ||
`; | ||
|
||
const ReviewLink = styled.a` | ||
position: relative; | ||
&:after { | ||
position: absolute; | ||
right: 0; | ||
content: ''; | ||
width: 1px; | ||
height: 15px; | ||
background-color: rgba(0, 0, 0, 0.6); | ||
} | ||
`; | ||
|
||
const ReportLink = styled.a``; | ||
|
||
export default CancelBox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export { default as CompleteButton } from './CompleteButton'; | ||
export { default as EndButton } from './EndButton'; | ||
export { default as NoneButton } from './NoneButton'; | ||
export { default as SuccessButton } from './SuccessButton'; | ||
export { default as FemaleSuccessButton } from './FemaleSuccessButton'; | ||
export { default as WaitingButton } from './WaitingButton'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export { default as CompleteBox } from './CompleteBox'; | ||
export { default as DatingEndBox } from './DatingEndBox'; | ||
export { default as FailBox } from './FailBox'; | ||
export { default as KakaoCopyBox } from './KakaoCopyBox'; | ||
export { default as MatchingStateTitle } from './MatchingStateTitle'; | ||
export { default as MatchingTemplete } from './MatchingTemplete'; | ||
export { default as MeetingEndBox } from './MeetingEndBox'; | ||
export { default as SuccessBox } from './SuccessBox'; | ||
export { default as WaitingBox } from './WaitingBox'; | ||
export { default as CancelBox } from './CancelBox'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,42 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
import React, { useEffect, useMemo, useState } from 'react'; | ||
import { Logo, Logout } from '@/assets/img'; | ||
import { palette } from '@/lib/styles/palette'; | ||
import styled from 'styled-components'; | ||
import DatingInfoBox from './DatingInfoBox'; | ||
import MeetingInfoBox from './MeetingInfoBox'; | ||
import { postLogout, postWithdrawal } from '@/lib/api/user'; | ||
import { useToggle } from '@/hooks/common'; | ||
import { useDatingSessionState, useToggle } from '@/hooks/common'; | ||
import { Modal } from '../base'; | ||
import Cookies from 'js-cookie'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import useUnivLoad from '@/hooks/survey/useUnivLoad'; | ||
|
||
interface MenuBlockProps { | ||
isMenu: boolean; | ||
onToggleMenu: () => void; | ||
} | ||
/** | ||
* 임시 유저 데이터 | ||
*/ | ||
const TempUserData = { | ||
email: '[email protected]', | ||
univ: 'Boston University', | ||
}; | ||
|
||
function MenuBlock({ isMenu, onToggleMenu }: MenuBlockProps) { | ||
const [isModal, onToggleModal] = useToggle(); | ||
const [errorMessage, setErrorMessage] = useState('에러가 발생했습니다😭 다시한번 시도해 주세요!'); | ||
const [isConfirm, setConfirm] = useState(false); | ||
const [isModal, onToggleModal] = useToggle(); | ||
const [isErrorModal, onToggleErrorModal] = useToggle(); | ||
const navigate = useNavigate(); | ||
const { initDatingState } = useDatingSessionState(); | ||
const { univs } = useUnivLoad(); | ||
|
||
const myUnivLabel = useMemo(() => { | ||
return univs.find(({ id }) => id === initDatingState.myUniversity)?.name; | ||
}, [univs]); | ||
|
||
const handleLogout = async () => { | ||
try { | ||
await postLogout(); | ||
Cookies.remove('AccessToken'); | ||
navigate('/'); | ||
} catch (e) { | ||
const message = (e as Error).message; | ||
setErrorMessage(message); | ||
onToggleErrorModal(); | ||
} | ||
}; | ||
|
@@ -55,8 +64,8 @@ function MenuBlock({ isMenu, onToggleMenu }: MenuBlockProps) { | |
<UserInfo> | ||
<SiteLogo src={Logo} alt="사이트 로고" /> | ||
<UserBox> | ||
<div>{TempUserData.email}</div> | ||
<div className="univ">{TempUserData.univ}</div> | ||
<div>{initDatingState.kakaoId}</div> | ||
<div className="univ">{myUnivLabel}</div> | ||
</UserBox> | ||
</UserInfo> | ||
<LogoutButton onClick={handleLogout}> | ||
|
@@ -86,7 +95,7 @@ function MenuBlock({ isMenu, onToggleMenu }: MenuBlockProps) { | |
height={140} | ||
bottonName="확인" | ||
title="알림" | ||
text="에러가 발생했습니다😭 다시한번 시도해 주세요!" | ||
text={errorMessage} | ||
onToggleModal={onToggleErrorModal} | ||
onClick={() => { | ||
void 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.