import React from 'react';
import {Sidebar, Menu, Segment, Icon} from 'semantic-ui-react';
import {Link} from 'react-router';

const MItem = ({toLink, txt, onClick, permission}) => {
	if(permission == 1) {
		return (
			<Menu.Item as={Link} to={toLink} content={txt} onClick={onClick} />
		)
	}
	return null;
}

export default MItem;