Passed
Push — task/hr-summary-comment-feed ( 4a343b )
by Yonathan
19:14 queued 05:29
created

resources/assets/js/components/HRPortal/SummaryHrActivityFeed.tsx   A

Complexity

Total Complexity 2
Complexity/F 0

Size

Lines of Code 37
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 28
mnd 2
bc 2
fnc 0
dl 0
loc 37
rs 10
bpm 0
cpm 0
noi 0
c 0
b 0
f 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 ActivityFeed from "../ActivityFeed";
6
7
interface SummaryHrActivityFeedProps {
8
  jobId: number;
9
}
10
11
const SummaryHrActivityFeed: React.FunctionComponent<SummaryHrActivityFeedProps> = ({
12
  jobId,
13
}) => {
14
  return (
15
    <>
16
      <CommentForm jobId={jobId} isHrAdviser location="job/review" />
17
      <hr data-c-hr="thin(black)" data-c-margin="top(1) left(2) right(2)" />
18
      <ActivityFeed jobId={jobId} isHrAdvisor />
19
    </>
20
  );
21
};
22
23
export default SummaryHrActivityFeed;
24
25
const container = document.getElementById("summary-hr-activity-feed");
26
if (container !== null) {
27
  if ("jobId" in container.dataset) {
28
    const jobId = Number(container.dataset.jobId as string);
29
    ReactDOM.render(
30
      <RootContainer>
31
        <SummaryHrActivityFeed jobId={jobId} />
32
      </RootContainer>,
33
      container,
34
    );
35
  }
36
}
37