From e549b2b0e9a2cd0114febcf148c1ecc086994b6f Mon Sep 17 00:00:00 2001
From: Joshua Mbogo <55801923+mbogo-mit@users.noreply.github.com>
Date: Fri, 8 Dec 2023 12:49:57 -0500
Subject: [PATCH] removing console.logs and fixing Document Tile code
---
src/components/DashboardChannels/DocumentTile.js | 5 +++--
src/components/DashboardChannels/DocumentsChannel.js | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/components/DashboardChannels/DocumentTile.js b/src/components/DashboardChannels/DocumentTile.js
index 0d2f41c..339f716 100644
--- a/src/components/DashboardChannels/DocumentTile.js
+++ b/src/components/DashboardChannels/DocumentTile.js
@@ -44,10 +44,11 @@ export default function DocumentTile({
const g = groups.slice().filter((g_item) => g_item);
if (g.length > 0) {
- const indexOfSelectedGroup = groups.findIndex((grp) => grp?._id === selectedGroupId);
+ const indexOfSelectedGroup = g.findIndex((grp) => grp?._id === selectedGroupId);
const selectedGroup = g.splice(indexOfSelectedGroup, 1)[0];
+
tileBadges = [
- ,
+ ,
];
}
diff --git a/src/components/DashboardChannels/DocumentsChannel.js b/src/components/DashboardChannels/DocumentsChannel.js
index 0714157..08b0f4d 100644
--- a/src/components/DashboardChannels/DocumentsChannel.js
+++ b/src/components/DashboardChannels/DocumentsChannel.js
@@ -195,10 +195,10 @@ export default function DocumentsChannel({
})
.then(async (data) => {
const { docs, count } = data;
- console.log('docs: ', docs);
+
await addGroupNamesToDocuments(docs)
.then((docsWithGroupNames) => {
- console.log('docsWithGroupNames: ', docsWithGroupNames)
+
const d = {
countByPermissions: {
[documentPermissions]: count,