import { FC } from 'react'; import { Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap'; import { RouterProps } from 'react-router'; import { ServerWithId } from './data'; export interface DeleteServerModalProps { server: ServerWithId; toggle: () => void; isOpen: boolean; redirectHome?: boolean; } interface DeleteServerModalConnectProps extends DeleteServerModalProps, RouterProps { deleteServer: (server: ServerWithId) => void; } const DeleteServerModal: FC = ( { server, toggle, isOpen, deleteServer, history, redirectHome = true }, ) => { const closeModal = () => { deleteServer(server); toggle(); redirectHome && history.push('/'); }; return ( Remove server

Are you sure you want to remove {server ? server.name : ''}?

No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment.

); }; export default DeleteServerModal;