Maxence LANONE 3 years ago
parent 5e2ceb9787
commit fc1db22d9b

@ -1,5 +1,5 @@
import React from 'react' import React from 'react'
import {Link,useLocation} from'react-router-dom'; import {Link,useLocation, useParams} from'react-router-dom';
import user from '../../images/user.jpg'; import user from '../../images/user.jpg';
const ContactDetail = (props) => { const ContactDetail = (props) => {
@ -9,6 +9,7 @@ const ContactDetail = (props) => {
// FROM CONTACTCARD IN LINK IT TOOK STATE AND THEN IT IS PASSED HERE // FROM CONTACTCARD IN LINK IT TOOK STATE AND THEN IT IS PASSED HERE
let location = useLocation(); let location = useLocation();
const {name, email} = location.state.contact; const {name, email} = location.state.contact;
const {idcontact} = useParams();
return ( return (
<div className='main'> <div className='main'>

@ -40,6 +40,12 @@ function Repertoire() {
}); });
}, []); }, []);
function onClickDetail() {
return <NavLink to="/Repertoire/add">
</NavLink>
}
return ( return (
<body className={theme}> <body className={theme}>
<div className="page_repertoire"> <div className="page_repertoire">
@ -76,14 +82,19 @@ function Repertoire() {
</TableRow> </TableRow>
</TableHead> </TableHead>
<TableBody> <TableBody>
{contacts.map((contact) => ( {contacts.map((contact) => (
<TableRow key={contact.idcontact}> <TableRow key={contact.idcontact} onClick={onClickDetail()}>
<TableCell><img className="photoContact" src={user} /></TableCell> <TableCell><img className="photoContact" src={user} /></TableCell>
<TableCell>{contact.lastname}</TableCell> <TableCell>{contact.lastname}</TableCell>
<TableCell>{contact.firstname}</TableCell> <TableCell>{contact.firstname}</TableCell>
<TableCell>{contact.name}</TableCell> <TableCell>{contact.name}</TableCell>
</TableRow> </TableRow>
))} ))}
</TableBody> </TableBody>
</Table> </Table>
</TableContainer> </TableContainer>

@ -190,11 +190,11 @@ body {
} }
} }
} }
} }
/*.bouton_submit { .bouton_submit {
display: flex; display: flex;
margin-left: 30px; margin-left: 30px;
align-items: center; align-items: center;
@ -239,10 +239,10 @@ body {
border-color: #3874ff; border-color: #3874ff;
} }
} }
} }
}
.name {
.name {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
@ -288,11 +288,11 @@ body {
} }
} }
} }
} }
}
.infoPerso { .infoPerso {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-evenly; justify-content: space-evenly;
@ -366,9 +366,9 @@ body {
margin-left: 207px; margin-left: 207px;
} }
} }
} }
.infoEntreprise { .infoEntreprise {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-evenly; justify-content: space-evenly;
@ -441,9 +441,6 @@ body {
margin-left: 115px; margin-left: 115px;
} }
} }
}
}
}
} }
#fileUpload[type="file"] { #fileUpload[type="file"] {
@ -466,4 +463,3 @@ body {
background-color: $xiketic; background-color: $xiketic;
cursor: pointer; cursor: pointer;
} }
}
Loading…
Cancel
Save