From 8d9225a9cb9dec9e62c865704b6f5183b79124cd Mon Sep 17 00:00:00 2001
From: mannika16161 <mannika16161@iiitd.ac.in>
Date: Apr 04 2021 16:01:36 +0000
Subject: [PATCH 1/2] removed hard coding from Events.js, landingPage.js, Minutes.js


---

diff --git a/src/App.js b/src/App.js
index b782aa0..c5a2d13 100644
--- a/src/App.js
+++ b/src/App.js
@@ -6,17 +6,20 @@ import { BrowserRouter } from 'react-router-dom'
 import Wizard from './wizard/Wizard';
 import LandingPage from './landingpage/LandingPage';
 import NotFound from './NotFound';
+import strings from './strings.json';
 
 
 class App extends Component {
+  
   render() {
+    console.log(strings);
     return (
       <BrowserRouter basename={window.env.SUBDIR}>
         <div>
           <Switch>
-            <Route path="/" exact component={LandingPage} />
+            <Route path="/" exact render={() => <LandingPage strings={strings.landingPage}/>} />
             <Route path="/wizard" component={Wizard} />
-            <Route path="/landingpage" component={LandingPage} />
+            <Route path="/landingpage" render={() => <LandingPage strings={strings.landingPage}/>} /> 
             <Route component={NotFound} />
           </Switch>
         </div>
diff --git a/src/landingpage/Events.js b/src/landingpage/Events.js
index 54eb80b..3fdb5ae 100644
--- a/src/landingpage/Events.js
+++ b/src/landingpage/Events.js
@@ -31,8 +31,8 @@ class Events extends Component {
     return (
       <div>
         <h1 className="padded">
-          Meetings and testdays in the next 7 days{" "}
-          <SourceLink href="https://apps.fedoraproject.org/calendar/QA/" />
+          {this.props.strings.heading}{" "}
+          <SourceLink href={this.props.strings.sourceLink} />
         </h1>
         <ul className="events">{meetings}</ul>
       </div>
diff --git a/src/landingpage/LandingPage.js b/src/landingpage/LandingPage.js
index b1bee82..395543a 100644
--- a/src/landingpage/LandingPage.js
+++ b/src/landingpage/LandingPage.js
@@ -66,9 +66,9 @@ class LandingPage extends Component {
 
   render() {
     const available_components = {
-      events: <Events data={this.props.meetings} />,
+      events: <Events data={this.props.meetings} strings={this.props.strings.events} />,
       blockers: <Blockers data={this.props.blockerbugs} release={this.props.devel} />,
-      minutes: <Minutes data={this.props.last_qa_meeting} />,
+      minutes: <Minutes data={this.props.last_qa_meeting} strings={this.props.strings.minutes}/>,
     }
     let components = _.chunk(
       this.state.config_mode ? this.available_components : this.state.enabled_components,
@@ -121,8 +121,7 @@ class LandingPage extends Component {
                 className="btn btn-primary btn-block btn-wrap-text btn-lg active"
                 to="/wizard"
                 role="button">
-                Do you have some spare time? Feeling like helping others? Wanna improve Fedora?
-                Click here!
+                {this.props.strings.homePage.textOnLink}
               </Link>
             </div>
           </Row>
diff --git a/src/landingpage/Minutes.js b/src/landingpage/Minutes.js
index 4f88f2b..e6cd0f1 100644
--- a/src/landingpage/Minutes.js
+++ b/src/landingpage/Minutes.js
@@ -4,7 +4,7 @@ class Events extends Component {
   render() {
     return (
       <div>
-        <h1 className="padded">Fedora QA Meeting Minutes</h1>
+        <h1 className="padded">{this.props.strings.heading}</h1>
         <div className="events">
           <a target="_blank" href={this.props.data.link} rel="noopener noreferrer">
             Latest minutes from {this.props.data.date}
@@ -13,7 +13,7 @@ class Events extends Component {
           Visit{" "}
           <a
             target="_blank"
-            href="https://meetbot.fedoraproject.org/sresults/?group_id=fedora-qa&type=team"
+            href={this.props.strings.meetbotLink}
             rel="noopener noreferrer">
             meetbot
           </a>{" "}
diff --git a/src/strings.json b/src/strings.json
new file mode 100644
index 0000000..47a9beb
--- /dev/null
+++ b/src/strings.json
@@ -0,0 +1,15 @@
+{
+    "landingPage":{
+        "homePage":{
+            "textOnLink": "Do you have some spare time? Feeling like helping others? Wanna improve Fedora? Click here!"
+        },
+        "events":{
+            "heading": "Meetings and testdays in the next 7 days",
+            "sourceLink" : "https://apps.fedoraproject.org/calendar/QA/"
+        },
+        "minutes":{
+            "heading": "Fedora QA Meeting Minutes",
+            "meetbotLink" : "https://meetbot.fedoraproject.org/sresults/?group_id=fedora-qa&type=team"            
+        }
+    }
+}
\ No newline at end of file

From b6a1975fe6abd81d61c5712a77d81a7f4016d951 Mon Sep 17 00:00:00 2001
From: mannika16161 <mannika16161@iiitd.ac.in>
Date: Apr 04 2021 16:07:24 +0000
Subject: [PATCH 2/2] Removed console.log statement I added during debugging


---

diff --git a/src/App.js b/src/App.js
index c5a2d13..407c308 100644
--- a/src/App.js
+++ b/src/App.js
@@ -10,9 +10,7 @@ import strings from './strings.json';
 
 
 class App extends Component {
-  
   render() {
-    console.log(strings);
     return (
       <BrowserRouter basename={window.env.SUBDIR}>
         <div>

