-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 프로필 수정 api 연결 * fix: 계좌번호 type 수정 * fix: 계좌번호 input 추가 * fix: rounded 수정 * fix: profileEditVerificationTypes 설정 * fix: 프로필 수정 로직 추가 * feat: 닉네임 수정 스키마 추가 * fix: profileImageUpload FieldValues 추가 * feat: 프로필 수정 api 연결 * remove: 불필요한 주석 삭제 * fix: 채팅방 계좌 설정 * remove: 불필요한 주석 제거
- Loading branch information
Showing
9 changed files
with
185 additions
and
32 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
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
14 changes: 6 additions & 8 deletions
14
src/components/sign/userInfoVerification/ProfileImageUpload.tsx
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,11 @@ | ||
import client from './clients'; | ||
import { ProfileEditVerificationTypes } from 'gachTaxi-types'; | ||
|
||
export const updateUserProfile = async (data: ProfileEditVerificationTypes) => { | ||
try { | ||
const res = await client.patch('/api/members/info', data); | ||
return res.data; | ||
} catch (error) { | ||
console.log('프로필 업데이트 실패', error); | ||
} | ||
}; |
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,78 @@ | ||
import Button from '@/components/commons/Button'; | ||
import Timer from '@/components/matchingInfo/TImer'; | ||
import useSSEStore from '@/store/useSSEStore'; | ||
import useTimerStore from '@/store/useTimerStore'; | ||
import { useEffect, useState } from 'react'; | ||
|
||
const MatchingInfoPage = () => { | ||
const { reset } = useTimerStore(); | ||
const { initializeSSE, messages } = useSSEStore(); | ||
|
||
const [roomCapacity, setRoomCapacity] = useState<number>(0); | ||
const [roomStatus, setRoomStatus] = useState<'searching' | 'matching'>( | ||
'searching', | ||
); | ||
|
||
useEffect(() => { | ||
initializeSSE(); | ||
}, [initializeSSE]); | ||
|
||
useEffect(() => { | ||
messages.forEach((message) => { | ||
switch (message.topic) { | ||
case 'match_member_joined': | ||
setRoomCapacity((prev) => Math.max(prev + 1, 4)); | ||
break; | ||
|
||
case 'match_member_cancelled': | ||
setRoomCapacity((prev) => Math.max(prev - 1, 0)); | ||
break; | ||
|
||
case 'match_room_created': | ||
setRoomCapacity((prev) => Math.max(prev + 1, 4)); | ||
setRoomStatus('matching'); | ||
break; | ||
|
||
default: | ||
break; | ||
} | ||
}); | ||
}, [messages, reset]); | ||
|
||
return ( | ||
<section className="flex-1 flex flex-col justify-between p-4"> | ||
<div className="w-full flex flex-col items-center mt-20"> | ||
{roomStatus === 'searching' ? ( | ||
<p className="font-bold text-header text-center"> | ||
매칭 방을 탐색중이에요! <br /> 조금만 기다려주세요! | ||
</p> | ||
) : ( | ||
<div className="w-full flex flex-col gap-2"> | ||
<p className="font-bold text-header text-center"> | ||
가치 탈 사람 <br /> | ||
찾는중... | ||
</p> | ||
<span className="font-medium text-captionHeader"> | ||
{roomCapacity}/4 | ||
</span> | ||
</div> | ||
)} | ||
</div> | ||
<div | ||
className={` w-full flex justify-center flex-col gap-2 items-center ${roomStatus === 'searching' ? 'flex-grow' : ''}`} | ||
> | ||
<Timer /> | ||
<>택시아이콘자리</> | ||
</div> | ||
{roomStatus === 'matching' && ( | ||
<div className=" w-full mb-4"> | ||
<Button className="w-full" onClick={() => reset()}> | ||
채팅방 | ||
</Button> | ||
</div> | ||
)} | ||
</section> | ||
); | ||
}; | ||
|
||
export default MatchingInfoPage; |
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