1 import { c } from 'ttag';
3 import type { DriveFileRevision } from '../../../store';
4 import { ContextMenuButton } from '../../sections/ContextMenu';
5 import type { RevisionsProviderState } from '../RevisionsProvider';
8 revision: DriveFileRevision;
9 restoreRevision: RevisionsProviderState['deleteRevision'];
13 const RevisionRestoreButton = ({ revision, restoreRevision, close }: Props) => {
16 name={c('Action').t`Restore version`}
17 icon="arrow-rotate-right"
18 testId="context-menu-revision-restore"
19 action={() => restoreRevision(new AbortController().signal, revision)}
25 export default RevisionRestoreButton;