edit 함수와 remove 함수는 나중에 마저 구현하겠습니다. 이제 PostCard 컴포넌트에서 이 Hook을 사용해보세요.

    components/PostCard.js

    (...)
    import ActionSheetModal from './ActionSheetModal';
    import usePostActions from '../hooks/usePostActions';
    
    function PostCard({user, photoURL, description, createdAt, id}) {
      (...)
    
      const {isSelecting, onPressMore, onClose, actions} = usePostActions();
    
      return (
        <>
          <View style={styles.block}>
            <View style={[styles.head, styles.paddingBlock]}>
              <Pressable style={styles.profile} onPress={onOpenProfile}>
                <Avatar source={user.photoURL && {uri: photoURL}} />
                <Text style={styles.displayName}>{user.displayName}</Text>
              </Pressable>
              {isMyPost && (
                <Pressable hitSlop={8} onPress={onPressMore}>
                  <Icon name="more-vert" size={20} />
                </Pressable>
              )}
            </View>
            (...)
          </View>
          <ActionSheetModal
            visible={isSelecting}
            actions={actions}
            onClose={onClose}
          />
        </>
      );
    }
    
    (...)
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.