const [blocks, setBlocks] = useState({});
if (name === "courses") {
setBlocks(dataCourse);
}
if (name === "tasks") {
setBlocks(dataTask);
}
if (name === "meetings") {
setBlocks(dataMeeting);
}
if (props.params !== undefined) {
const params = props.params.split("_")[1]; // props.params = "courses_0"
const fel = bigData.filter((a) => a.id_course === params); // {id_course: 0}
setBlocks(fel)
}
console.log(blocks)
if (i > 2) continue;