Skip to content

Commit

Permalink
๐Ÿฉน ์นœ๊ตฌ ์ด๋ฆ„ ์œ ํšจํ•˜์ง€ ์•Š์„๋•Œ alert (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
woohm402 authored Sep 6, 2023
1 parent bc65c9e commit 205f620
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useState } from 'react';
import { Alert, FlatList, StyleSheet, TouchableOpacity, View } from 'react-native';

import { FriendId } from '../../../../../entities/friend';
import { get } from '../../../../../utils/get';
import { BottomSheet } from '../../../../components/BottomSheet';
import { EmptyView } from '../../../../components/EmptyView';
import { MoreIcon } from '../../../../components/Icons/MoreIcon';
Expand Down Expand Up @@ -99,7 +100,13 @@ export const ManageFriendsDrawerContentActiveList = ({ onClickFriend }: Props) =
right={{
text: '์ ์šฉ',
onPress: () =>
patchDisplayName(bottomSheetState, { onSuccess: () => setBottomSheetState({ isOpen: false }) }),
patchDisplayName(bottomSheetState, {
onSuccess: () => setBottomSheetState({ isOpen: false }),
onError: (err) => {
const message = get(err, ['displayMessage']);
Alert.alert(message ? `${message}` : '์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.');
},
}),
disabled: !isDisplayNameModifyable,
}}
/>
Expand Down

0 comments on commit 205f620

Please sign in to comment.