import React, { useState } from "react"; import { useDispatch } from "react-redux"; import { setProject } from "../../../redux/projectsTrackerSlice"; import "./ModalCreate.scss"; export const ModalCreate = ({ active, setActive, title }) => { const [inputValue, setInputValue] = useState(""); const dispatch = useDispatch(); function createName() { let newItem = { name: inputValue, count: 0, }; dispatch(setProject(newItem)); setActive(false); setInputValue("") } return (