-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(chat): 채팅 생성창에서 친구목록을 가져올 수 있도록 구현
개요 - 채팅 생성창에서 친구목록을 가져올 수 있도록 한다. 수정 사항 - `FriendList.jsx` - default value 삭제 - api.js - 현재 멤버의 커넥트 가져오는 함수 구현 - `ChatRoomPage.jsx` - 현재의 멤버Id와 커넥트를 가져오는 부분 `useEffect`에 구현 - `FriendListPage.jsx` - `filterAcceptedConnects`: 성사된 커넥트만 보여줌 - `getOtherMemberFromConnect`: 커넥트에서 상대방의 정보를 가져옴 - 정보를 바탕으로 친구목록을 보여줌 - `secureStoreUtils.js` - 본인 ID를 secure store에서 가져오는 과정이 계속 반복되어, 유틸 함수로 추출
1 parent
043c3c2
commit f12011d
Showing
5 changed files
with
55 additions
and
28 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
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 * as SecureStore from "expo-secure-store"; | ||
|
||
export const getMyMemberId = async () => { | ||
try { | ||
const myMemberId = await SecureStore.getItemAsync("memberId"); | ||
return myMemberId ? parseInt(myMemberId) : null; | ||
} catch (error) { | ||
console.error("본인 memberId를 로컬에서 가져올 수 없습니다.", error); | ||
return null; | ||
} | ||
}; |