-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJobDetails.js
58 lines (52 loc) · 1.46 KB
/
JobDetails.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import React, { useContext } from 'react';
import JobsContext from '../context/jobs';
import Image from './Image';
import './JobDetails.css';
const JobDetails = () => {
const { details, onResetPage } = useContext(JobsContext);
const {
description,
company,
company_url,
company_logo,
how_to_apply,
} = details;
return (
<div className='job-details'>
<div className='back-link'>
<span onClick={onResetPage}><< Back to results</span>
</div>
<hr />
<div className='main-section'>
<div className='left-section'>
<div
className='job-description'
dangerouslySetInnerHTML={{ __html: description }}
></div>
</div>
<div className='right-section'>
<div className='company-details'>
<h3>About company</h3>
<Image
src={company_logo}
height='250'
width='250'
alt={company}
className='company-logo'
draggable='false'
/>
<div className='company-name'>{company}</div>
<a className='company-url' href={company_url}>
{company_url}
</a>
</div>
<div className='how-to-apply'>
<h3>How to apply</h3>
<div dangerouslySetInnerHTML={{ __html: how_to_apply }} />
</div>
</div>
</div>
</div>
);
};
export default JobDetails;