// Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; import type { LocalizerType } from '../../types/Util'; import { ConfirmationDialog } from '../ConfirmationDialog'; export type PropsType = { conversationId: string; i18n: LocalizerType; cancelJoinRequest: (conversationId: string) => unknown; }; export function GroupV2PendingApprovalActions({ cancelJoinRequest, conversationId, i18n, }: PropsType): JSX.Element { const [isConfirming, setIsConfirming] = React.useState(false); return (

{i18n('GroupV2--join--requested')}

{isConfirming ? ( cancelJoinRequest(conversationId), }, ]} cancelText={i18n('GroupV2--join--cancel-request-to-join--no')} dialogName="GroupV2CancelRequestToJoin" i18n={i18n} onClose={() => setIsConfirming(false)} > {i18n('GroupV2--join--cancel-request-to-join--confirmation')} ) : undefined}
); }