Skip to content

Commit

Permalink
removing console.logs and fixing Document Tile code
Browse files Browse the repository at this point in the history
  • Loading branch information
mbogo-mit committed Dec 8, 2023
1 parent b048e88 commit e549b2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/components/DashboardChannels/DocumentTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
<TileBadge key="selectedGroup" color="blue" text={selectedGroup.name} />,
<TileBadge key="selectedGroup" color="blue" text={selectedGroup?.name} />,
];
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/DashboardChannels/DocumentsChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e549b2b

Please sign in to comment.