From 8ecb0f027a77a94195033d8771f0ce0d713b8f0f Mon Sep 17 00:00:00 2001
From: danieldeng2 <danieldeng223@gmail.com>
Date: Tue, 11 Aug 2020 22:06:48 +0100
Subject: [PATCH] Update piazza code and course title

---
 .../organisms/LeftBarModule/index.tsx         |  7 ++-
 .../components/pages/ModuleOverview/index.tsx | 47 ++++++++++++++++++-
 .../pages/ModuleResources/index.tsx           |  2 +-
 3 files changed, 53 insertions(+), 3 deletions(-)

diff --git a/frontend/src/components/organisms/LeftBarModule/index.tsx b/frontend/src/components/organisms/LeftBarModule/index.tsx
index c621898ed..80c2b54f4 100644
--- a/frontend/src/components/organisms/LeftBarModule/index.tsx
+++ b/frontend/src/components/organisms/LeftBarModule/index.tsx
@@ -13,7 +13,12 @@ const LeftBarModule: React.FC = () => {
     CO140: "k0r3c04qwhj3e",
     CO142: "k0r3c156mj35b",
     CO112: "k0r3by316kp6",
-    CO145: "k0r3c1h4zik5y",
+		CO145: "k0r3c1h4zik5y",
+		"CO120.2": "k0r3bzfpcno23",
+		CO150: "k0r3c1t4x8k6l",
+		CO113: "k0r3byq0f68t",
+		CO141: "k0r3c0t7dak4o",
+		CO130: "k0r3bzsith2r",
   };
 
   let piazzaLink = "https://piazza.com/class/";
diff --git a/frontend/src/components/pages/ModuleOverview/index.tsx b/frontend/src/components/pages/ModuleOverview/index.tsx
index d963e52d3..8e8013ff3 100644
--- a/frontend/src/components/pages/ModuleOverview/index.tsx
+++ b/frontend/src/components/pages/ModuleOverview/index.tsx
@@ -4,9 +4,54 @@ import { useParams } from "react-router-dom";
 
 const ModuleOverview: React.FC = () => {
   let { id } = useParams();
+  let modules = [
+    {
+      title: "Introduction to Logic",
+      code: "CO140",
+    },
+    {
+      title: "Discrete Mathematics",
+      code: "CO142",
+    },
+    {
+      title: "Introduction to Computer Systems",
+      code: "CO112",
+    },
+    {
+      title: "Mathematical Methods",
+      code: "CO145",
+    },
+    {
+      title: "Java",
+      code: "CO120.2",
+    },
+    {
+      title: "Graphs and Algorithms",
+      code: "CO150",
+    },
+    {
+      title: "Introduction to Computer Architecture",
+      code: "CO113",
+    },
+    {
+      title: "Reasoning About Programs",
+      code: "CO141",
+    },
+    {
+      title: "Introduction to Databases",
+      code: "CO130",
+    },
+  ];
+  let heading = id;
+  for (let i in modules) {
+    if (modules[i].code === id) {
+      heading = modules[i].title;
+      break;
+    }
+  }
   return (
     <>
-      <Dandruff heading={id} />
+      <Dandruff heading={heading} />
     </>
   );
 };
diff --git a/frontend/src/components/pages/ModuleResources/index.tsx b/frontend/src/components/pages/ModuleResources/index.tsx
index a45eb4f00..1f5214619 100644
--- a/frontend/src/components/pages/ModuleResources/index.tsx
+++ b/frontend/src/components/pages/ModuleResources/index.tsx
@@ -99,4 +99,4 @@ const ModuleResources: React.FC = () => {
   );
 };
 
-export default ModuleResources;
+export default ModuleResources;
\ No newline at end of file
-- 
GitLab