2021-01-29 22:16:48 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
import * as React from 'react';
|
2021-10-26 19:15:33 +00:00
|
|
|
import type { LocalizerType } from '../../types/Util';
|
2021-01-29 22:16:48 +00:00
|
|
|
|
|
|
|
export type PropsType = {
|
|
|
|
i18n: LocalizerType;
|
|
|
|
onCancelJoinRequest: () => unknown;
|
|
|
|
};
|
|
|
|
|
2022-11-18 00:45:19 +00:00
|
|
|
export function GroupV2PendingApprovalActions({
|
2021-01-29 22:16:48 +00:00
|
|
|
i18n,
|
|
|
|
onCancelJoinRequest,
|
2022-11-18 00:45:19 +00:00
|
|
|
}: PropsType): JSX.Element {
|
2021-01-29 22:16:48 +00:00
|
|
|
return (
|
|
|
|
<div className="module-group-v2-pending-approval-actions">
|
|
|
|
<p className="module-group-v2-pending-approval-actions__message">
|
|
|
|
{i18n('GroupV2--join--requested')}
|
|
|
|
</p>
|
|
|
|
<div className="module-group-v2-pending-approval-actions__buttons">
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
onClick={onCancelJoinRequest}
|
|
|
|
tabIndex={0}
|
|
|
|
className="module-group-v2-pending-approval-actions__buttons__button"
|
|
|
|
>
|
|
|
|
{i18n('GroupV2--join--cancel-request-to-join')}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
2022-11-18 00:45:19 +00:00
|
|
|
}
|