Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[friends-native] 카톡 친구추가 api 실패 에러 핸들링 #188

Merged
merged 3 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ export const RequestFriendsMethodList = () => {
/>
<Typography>카카오톡으로 친구 초대</Typography>
</TouchableOpacity>
</View>
<View style={styles.sheetContent}>
<TouchableOpacity style={styles.sheetItem} onPress={() => setRequestFriendModalStep('REQUEST_WITH_NICKNAME')}>
<UserHashtagIcon
width={30}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { FriendTimetable } from './FriendTimetable';
import { ManageFriendsDrawerContent } from './ManageFriendsDrawerContent';
import { RequestFriendsBottomSheetContent } from './RequestFriendsBottomSheetContent';
import { AcceptFriendWithKakaoResponse } from '../../../repositories/responses/Friend';
import { get } from '../../../utils/get';

export type RequestFriendModalStep = 'METHOD_LIST' | 'REQUEST_WITH_NICKNAME';

Expand Down Expand Up @@ -126,6 +127,10 @@ export const MainScreen = () => {

dispatch({ type: 'setFriend', friendId: response.id });
},
onError: (err) => {
const message = get(err, ['displayMessage']);
Alert.alert(message ? `${message}` : '친구 추가를 실패했습니다.\n잠시 후, 다시 시도해 주세요.');
},
},
);
});
Expand Down
Loading