import React from 'react';
import {Modal, Button} from 'semantic-ui-react';

const Dialog = ({obj, getNext}) => (
	<Modal open={obj && obj.msg != '' ? true : false} onClose={() => getNext(obj.act)} style={{zIndex: "2001"}}>
		<Modal.Content>{obj && obj.msg ? obj.msg : ''}</Modal.Content>
		<Modal.Actions>
			<Button onClick={() => getNext(obj.act)} content="OK" />
		</Modal.Actions>
	</Modal>
);


export default Dialog;