import React, { useState } from 'react' import { useDispatch } from 'react-redux' import { addProject } from '../../actions/projects' import TextInputModal from '../../components/modals/TextInputModal' import { Button } from 'reactstrap' /** * A container for creating a new project. */ const NewProjectContainer = () => { const [isVisible, setVisible] = useState(false) const dispatch = useDispatch() const callback = (text) => { if (text) { dispatch(addProject(text)) } setVisible(false) } return ( <>