import React, { useState } from "react"; import { useDispatch } from "react-redux"; import { moveProjectTask } from "@redux/projectsTrackerSlice"; import arrowDown from "assets/icons/arrows/selectArrow.png"; import "./trackerSelectColumn.scss"; export const TrackerSelectColumn = ({ columns, task, currentColumn }) => { const dispatch = useDispatch(); const [openSelect, setOpenSelect] = useState(false); return (
setOpenSelect(!openSelect)} >

{currentColumn.title}

arrow {openSelect && (
{columns.map((column) => { return (

{ dispatch( moveProjectTask({ startWrapperIndex: { index: currentColumn.id, task }, columnId: column.id, }) ); }} > {column.title}

); })}
)}
); }; export default TrackerSelectColumn;