|
@@ -9,23 +9,33 @@ export class MoreInfo extends React.Component {
|
|
const service = services.find(el => el._id === match.params.service);
|
|
const service = services.find(el => el._id === match.params.service);
|
|
return (
|
|
return (
|
|
<>
|
|
<>
|
|
- {doctor &&
|
|
|
|
- <div style={{display:'flex',flexDirection:'column', width:'200px', margin:'100px 20px'}}>
|
|
|
|
- <h3>{doctor.name}</h3>
|
|
|
|
- <img src={`.${doctor.photo}`} alt=""/>
|
|
|
|
- <p>{doctor.profession}</p>
|
|
|
|
- <p>Опыт работы более {new Date().toISOString().split('T')[0].split('-')[0] - doctor.experience.split('T')[0].split('-')[0]} лет</p>
|
|
|
|
- <Link to={`/appointment/${doctor}`}>Make an appointment</Link>
|
|
|
|
- </div>}
|
|
|
|
|
|
+ <div className="main">
|
|
|
|
+ {doctor &&
|
|
|
|
+ <div className = "info-wrap">
|
|
|
|
+ <div className="card">
|
|
|
|
+ <div className="card-item">
|
|
|
|
+ <img src={`.${doctor.photo}`} alt=""/>
|
|
|
|
+ </div>
|
|
|
|
+ <div className="card-item desc">
|
|
|
|
+ <h3>{doctor.name}</h3>
|
|
|
|
+ <p className = "highlights">{doctor.profession}</p>
|
|
|
|
+ <p className = "highlights">Опыт работы более {new Date().toISOString().split('T')[0].split('-')[0] - doctor.experience.split('T')[0].split('-')[0]} лет</p>
|
|
|
|
+ {doctor.skillsDescription.split ("<br>").map ( (el, index) => ( <p key= {index}> { el } </p>) ) }
|
|
|
|
+ <Link to={`/appointment/${doctor}`} className = "btn link">Make an appointment</Link>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>}
|
|
|
|
|
|
{service &&
|
|
{service &&
|
|
- <div style={{display:'flex',flexDirection:'column', width:'200px', margin:'100px 20px'}}>
|
|
|
|
|
|
+ <div className = "info-wrap">
|
|
{service.name}
|
|
{service.name}
|
|
<p>Duration:{service.duration}h</p>
|
|
<p>Duration:{service.duration}h</p>
|
|
<p>{service.description}</p>
|
|
<p>{service.description}</p>
|
|
<p>Price:{service.price}грн.</p>
|
|
<p>Price:{service.price}грн.</p>
|
|
<Link to={`/appointment/${service}`}>Make an appointment</Link>
|
|
<Link to={`/appointment/${service}`}>Make an appointment</Link>
|
|
</div>}
|
|
</div>}
|
|
|
|
+ </div>
|
|
|
|
+
|
|
</>
|
|
</>
|
|
);
|
|
);
|
|
}
|
|
}
|