From 82838a377e2ecf1e895a1eb0c0f9f3c34de8daf2 Mon Sep 17 00:00:00 2001
From: manisha <manisha_kanyal.scsebtech@galgotiasuniversity.edu.in>
Date: Apr 09 2021 14:03:09 +0000
Subject: added BugStats component


merge conflict fix

---

diff --git a/src/landingpage/Blockers.js b/src/landingpage/Blockers.js
index 30b923a..ef30f1b 100644
--- a/src/landingpage/Blockers.js
+++ b/src/landingpage/Blockers.js
@@ -1,6 +1,7 @@
 import React, { Component } from "react"
 import { Row } from "reactstrap"
 import SourceLink from "./SourceLink"
+import BugStats from "./common/BugStats"
 
 class Blockers extends Component {
   constructor(props) {
@@ -17,65 +18,8 @@ class Blockers extends Component {
             <SourceLink href="https://qa.fedoraproject.org/blockerbugs/" />
           </h1>
           <Row>
-            <div className="col-md-6">
-              <table className="events">
-                <thead>
-                  <tr>
-                    <td colSpan="2">
-                      <b>Beta</b>
-                    </td>
-                  </tr>
-                </thead>
-                <tbody>
-                  <tr>
-                    <td>Proposed Blockers</td>
-                    <td className="bugscount">{this.props.data.beta_blockers_proposed}</td>
-                  </tr>
-                  <tr>
-                    <td>Accepted Blockers</td>
-                    <td className="bugscount">{this.props.data.beta_blockers}</td>
-                  </tr>
-                  <tr>
-                    <td>Proposed FEs</td>
-                    <td className="bugscount">{this.props.data.beta_fe_proposed}</td>
-                  </tr>
-                  <tr>
-                    <td>Accepted FEs</td>
-                    <td className="bugscount">{this.props.data.beta_fe}</td>
-                  </tr>
-                </tbody>
-              </table>
-            </div>
-
-            <div className="col-md-6">
-              <table className="events">
-                <thead>
-                  <tr>
-                    <td colSpan="2">
-                      <b>Final</b>
-                    </td>
-                  </tr>
-                </thead>
-                <tbody>
-                  <tr>
-                    <td>Proposed Blockers</td>
-                    <td className="bugscount">{this.props.data.final_blockers_proposed}</td>
-                  </tr>
-                  <tr>
-                    <td>Accepted Blockers</td>
-                    <td className="bugscount">{this.props.data.final_blockers}</td>
-                  </tr>
-                  <tr>
-                    <td>Proposed FEs</td>
-                    <td className="bugscount">{this.props.data.final_fe_proposed}</td>
-                  </tr>
-                  <tr>
-                    <td>Accepted FEs</td>
-                    <td className="bugscount">{this.props.data.final_fe}</td>
-                  </tr>
-                </tbody>
-              </table>
-            </div>
+            <BugStats milestone = {"Beta"} stats = {this.props.data.beta} />
+            <BugStats milestone = {"Final"} stats = {this.props.data.final} />
           </Row>
         </div>
       )
diff --git a/src/landingpage/common/BugStats.js b/src/landingpage/common/BugStats.js
new file mode 100644
index 0000000..938dadd
--- /dev/null
+++ b/src/landingpage/common/BugStats.js
@@ -0,0 +1,39 @@
+import React from 'react'
+
+const BugStats = (props) => {
+    const { milestone, stats } = props;
+    
+    return (
+            <div className="col-md-6">
+              <table className="events">
+                <thead>
+                  <tr>
+                    <td colSpan="2">
+                      <b>{milestone}</b>
+                    </td>
+                  </tr>
+                </thead>
+                <tbody>
+                  <tr>
+                    <td>Proposed Blockers</td>
+                    <td className="bugscount">{stats.blockers_proposed}</td>
+                  </tr>
+                  <tr>
+                    <td>Accepted Blockers</td>
+                    <td className="bugscount">{stats.blockers}</td>
+                  </tr>
+                  <tr>
+                    <td>Proposed FEs</td>
+                    <td className="bugscount">{stats.fe_proposed}</td>
+                  </tr>
+                  <tr>
+                    <td>Accepted FEs</td>
+                    <td className="bugscount">{stats.fe}</td>
+                  </tr>
+                </tbody>
+              </table>
+            </div>
+    )
+}
+
+export default BugStats

