{"size": 729, "ext": "js", "max_stars_repo_path": "client/src/app/releaseBacklog/components/CreateTaskAlert.js", "max_stars_repo_name": "kwapfumu/scrumBoardManagerES6React_ReduxView", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/app/releaseBacklog/components/CreateTaskAlert.js", "max_issues_repo_name": "kwapfumu/scrumBoardManagerES6React_ReduxView", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/app/releaseBacklog/components/CreateTaskAlert.js", "max_forks_repo_name": "kwapfumu/scrumBoardManagerES6React_ReduxView", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 29.16, "max_line_length": 99, "alphanum_fraction": 0.7037037037}
"use strict";
/**CreateTaskAlert appears only when there are no tasks created yet.*/
import React, { Component } from 'react';
import {Alert} from 'react-bootstrap';
import {LinkContainer} from 'react-router-bootstrap';

const CreateTaskAlert = (props) => {
	if (props.isAdmin && props.alertVisible) {
		return (
			<Alert bsStyle="warning" onDismiss={props.handleOnDismiss}>
				<h4> No Tasks yet, why don't you <LinkContainer to="/newTask">create one</LinkContainer>?</h4>
			</Alert>
		);
	}else{
		return;
	};
};	

CreateTaskAlert.propTypes = {
	isAdmin:PropTypes.bool.isRequired,
	alertVisible:PropTypes.bool.isRequired,
	handleOnDismiss:PropTypes.func.isRequired,
};

export default CreateTaskAlert;