Commit aeb834b4 authored by Ibadullina Inabat's avatar Ibadullina Inabat

начала реализовать удаление проекта, продолжу в другой ветке

parent 7e02a2b3
...@@ -2,33 +2,41 @@ import { Card, CardActions, CardContent, Grid, IconButton } from "@mui/material" ...@@ -2,33 +2,41 @@ import { Card, CardActions, CardContent, Grid, IconButton } from "@mui/material"
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import ArrowForwardIcon from "@mui/icons-material/ArrowForward"; import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import DeleteIcon from "@mui/icons-material/Delete";
const ProjectItem = ({ title, tasks, id }) => { const ProjectItem = ({ title, tasks, id }) => {
const user = useSelector(state => state.users.user); const user = useSelector(state => state.users.user);
const dispatch = useDispatch(); const dispatch = useDispatch();
console.log(user) console.log(user)
return <> return <>
<Grid item xs={12} sm={12} md={6} lg={4}> <Grid item xs={12} sm={12} md={6} lg={4}>
<Card> <Card>
<CardContent > <CardContent >
<strong> <strong>
<br></br> <br></br>
Название проекта: {title} Название проекта: {title}
</strong> </strong>
<strong> <strong>
<br></br> <br></br>
{/* Задачи: {tasks} */} {/* Задачи: {tasks} */}
</strong> </strong>
</CardContent> </CardContent>
<CardActions> <CardActions>
<IconButton component={Link} to={"/projects/" + id}> <IconButton component={Link} to={"/projects/" + id}>
<ArrowForwardIcon /> <ArrowForwardIcon />
</IconButton> </IconButton>
</CardActions> <IconButton
</Card> onClick={(id) => {
</Grid> // deleteHandle(userId);
}}
>
{(title !== "Личные дела") ?
<DeleteIcon /> : null}
</IconButton>
</CardActions>
</Card>
</Grid>
</> </>
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment