mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
25 lines
707 B
TypeScript
25 lines
707 B
TypeScript
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 };
|