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