Maxence LANONE 3 years ago
parent 5e2ceb9787
commit fc1db22d9b

@ -1,5 +1,5 @@
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';
const ContactDetail = (props) => {
@ -9,6 +9,7 @@ const ContactDetail = (props) => {
// FROM CONTACTCARD IN LINK IT TOOK STATE AND THEN IT IS PASSED HERE
let location = useLocation();
const {name, email} = location.state.contact;
const {idcontact} = useParams();
return (
<div className='main'>

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

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