Total Complexity | 2 |
Complexity/F | 0 |
Lines of Code | 46 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import * as React from "react"; |
||
2 | import ReactDOM from "react-dom"; |
||
3 | import RootContainer from "../RootContainer"; |
||
4 | import CommentForm from "../CommentForm"; |
||
5 | import ActivityList from "../ActivityList"; |
||
6 | import { LocationId } from "../../models/lookupConstants"; |
||
7 | import { Portal } from "../../models/app"; |
||
8 | |||
9 | interface JobSummaryActivityFeedProps { |
||
10 | jobId: number; |
||
11 | portal: Portal; |
||
12 | } |
||
13 | |||
14 | const JobSummaryActivityFeed: React.FunctionComponent<JobSummaryActivityFeedProps> = ({ |
||
15 | jobId, |
||
16 | portal, |
||
17 | }) => { |
||
18 | return ( |
||
19 | <> |
||
20 | <CommentForm |
||
21 | jobId={jobId} |
||
22 | isHrAdvisor={portal === "hr"} |
||
23 | location={LocationId.summary} |
||
24 | /> |
||
25 | <hr data-c-hr="thin(black)" data-c-margin="top(1)" /> |
||
26 | <ActivityList jobId={jobId} isHrAdvisor={portal === "hr"} /> |
||
27 | </> |
||
28 | ); |
||
29 | }; |
||
30 | |||
31 | export default JobSummaryActivityFeed; |
||
32 | |||
33 | const container = document.getElementById("summary-hr-activity-feed"); |
||
34 | if (container !== null) { |
||
35 | if ("jobId" in container.dataset) { |
||
36 | const jobId = Number(container.dataset.jobId as string); |
||
37 | const portal = container.dataset.portal as Portal; |
||
38 | ReactDOM.render( |
||
39 | <RootContainer> |
||
40 | <JobSummaryActivityFeed jobId={jobId} portal={portal} /> |
||
41 | </RootContainer>, |
||
42 | container, |
||
43 | ); |
||
44 | } |
||
45 | } |
||
46 |