1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00

comment undelete

This commit is contained in:
Fedor Katurov 2019-12-03 16:06:43 +07:00
parent 45d6e9a052
commit ba6b0bfe98
6 changed files with 50 additions and 6 deletions

View file

@ -0,0 +1,25 @@
import React, { FC, useCallback } from 'react';
import styles from './styles.scss';
import { Button } from '~/components/input/Button';
import { nodeLockComment } from '~/redux/node/actions';
import { IComment } from '~/redux/types';
interface IProps {
id: IComment['id'];
onDelete: typeof nodeLockComment;
}
const CommendDeleted: FC<IProps> = ({ id, onDelete }) => {
const onRestore = useCallback(() => onDelete(id, false), [onDelete]);
return (
<div className={styles.wrap}>
<div>Комментарий удалён</div>
<Button size="mini" onClick={onRestore} iconLeft="restore">
Восстановить
</Button>
</div>
);
};
export { CommendDeleted };