Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / applications / drive / src / app / components / sections / SharedWithMe / ContextMenuButtons / AcceptButton.tsx
bloba48b7b2077c6fbe67ab3281db5ec086b4da8da2f
1 import { c } from 'ttag';
3 import { useInvitationsActions } from '../../../../store';
4 import { ContextMenuButton } from '../../ContextMenu';
6 interface Props {
7     invitationId: string;
8     close: () => void;
10 export const AcceptButton = ({ invitationId, close }: Props) => {
11     const { acceptInvitation } = useInvitationsActions();
12     return (
13         <ContextMenuButton
14             icon="checkmark"
15             name={c('Action').t`Accept`}
16             action={() => acceptInvitation(new AbortController().signal, invitationId)}
17             close={close}
18             testId="shared-with-me-accept-invitation"
19         />
20     );