From 0b7445ed777046133aaf91ec9860eb3fb07d60d0 Mon Sep 17 00:00:00 2001
From: Zara Mudassar <zara.1310@hotmail.com>
Date: Thu, 28 Apr 2022 15:16:58 +0200
Subject: [PATCH] Added comments

---
 src/components/CommunityComponents/CommunityHome.vue | 6 +++++-
 tests/unit/apiutil-communityHome-mock.spec.js        | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/components/CommunityComponents/CommunityHome.vue b/src/components/CommunityComponents/CommunityHome.vue
index 0468261..3e8aa3b 100644
--- a/src/components/CommunityComponents/CommunityHome.vue
+++ b/src/components/CommunityComponents/CommunityHome.vue
@@ -1,8 +1,12 @@
 <template>
   <section class="relative w-full max-w-md px-5 py-4 mx-auto rounded-md">
+
+    <!-- Community name header -->
     <div class="mb-5 mt-5 border-b-2 border-blue-900">
       <label class="text-xl font-bold">{{ community.name }}</label>
     </div>
+
+    <!-- Search field -->
     <div class="relative" id="searchComponent">
       <span class="absolute inset-y-0 left-0 flex items-center pl-3">
         <svg class="w-5 h-5 text-gray-400" viewBox="0 0 24 24" fill="none">
@@ -25,6 +29,7 @@
       />
     </div>
 
+    <!-- Item cards -->
     <div class="absolute inset-x-0 px-6 py-3 mt-4">
       <div class="grid grid-cols-2">
         <ItemCard v-for="item in searchedItems" :key="item" :item="item" />
@@ -76,7 +81,6 @@ export default {
     getCommunityFromAPI: async function (){
       this.communityID = await this.$router.currentRoute.value.params.communityID;
       this.community = await GetCommunity(this.communityID);
-      console.log("community: " + this.community.name);
     },
     getListingsOfCommunityFromAPI: async function(){
       this.communityID = await this.$router.currentRoute.value.params.communityID;
diff --git a/tests/unit/apiutil-communityHome-mock.spec.js b/tests/unit/apiutil-communityHome-mock.spec.js
index 8338417..e627100 100644
--- a/tests/unit/apiutil-communityHome-mock.spec.js
+++ b/tests/unit/apiutil-communityHome-mock.spec.js
@@ -54,5 +54,5 @@ describe("testing mocking of apiutil.js", () => {
 
         const communityItemResponse = await GetListingsInCommunity(4040);
         expect(communityItemResponse).toBe(expectedResponse);
-    });
+    })
 });
-- 
GitLab