From b71586353f55b6261ee5fed017d470119977e1c8 Mon Sep 17 00:00:00 2001
From: Shekhar Patel <90516956+duplixx@users.noreply.github.com>
Date: Sat, 25 Nov 2023 21:56:49 +0530
Subject: [PATCH] MVP Talawa Admin : Hiding Chat Feature from Talawa Web App
(#1078)
* chat changes
* test case
---
src/App.tsx | 6 +++---
.../OrganizationNavbar/OrganizationNavbar.test.tsx | 4 ++--
.../OrganizationNavbar/OrganizationNavbar.tsx | 14 +++++++-------
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/App.tsx b/src/App.tsx
index 1c69256c32..02f28b9212 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -32,9 +32,9 @@ import Settings from 'screens/UserPortal/Settings/Settings';
import Donate from 'screens/UserPortal/Donate/Donate';
import Events from 'screens/UserPortal/Events/Events';
import Tasks from 'screens/UserPortal/Tasks/Tasks';
+// import Chat from 'screens/UserPortal/Chat/Chat';
import Advertisements from 'components/Advertisements/Advertisements';
-import Chat from 'screens/UserPortal/Chat/Chat';
-
+
function app(): JSX.Element {
/*const { updatePluginLinks, updateInstalled } = bindActionCreators(
actionCreators,
@@ -130,7 +130,7 @@ function app(): JSX.Element {
-
+ {/* */}
diff --git a/src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.test.tsx b/src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.test.tsx
index 941b76f4af..a5c1859ccd 100644
--- a/src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.test.tsx
+++ b/src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.test.tsx
@@ -105,7 +105,7 @@ describe('Testing OrganizationNavbar Component [User Portal]', () => {
expect(screen.getByText('People')).toBeInTheDocument();
expect(screen.getByText('Events')).toBeInTheDocument();
expect(screen.getByText('Donate')).toBeInTheDocument();
- expect(screen.getByText('Chat')).toBeInTheDocument();
+ // expect(screen.getByText('Chat')).toBeInTheDocument();
});
test('The language is switched to English', async () => {
@@ -135,7 +135,7 @@ describe('Testing OrganizationNavbar Component [User Portal]', () => {
expect(screen.getByText('People')).toBeInTheDocument();
expect(screen.getByText('Events')).toBeInTheDocument();
expect(screen.getByText('Donate')).toBeInTheDocument();
- expect(screen.getByText('Chat')).toBeInTheDocument();
+ // expect(screen.getByText('Chat')).toBeInTheDocument();
});
test('The language is switched to fr', async () => {
diff --git a/src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.tsx b/src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.tsx
index 72e73783da..4bcaca4a8e 100644
--- a/src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.tsx
+++ b/src/components/UserPortal/OrganizationNavbar/OrganizationNavbar.tsx
@@ -84,13 +84,13 @@ function organizationNavbar(props: InterfaceNavbarProps): JSX.Element {
translated: t('donate'),
view: true,
},
- {
- pluginName: 'Chats',
- alias: 'chat',
- link: `/user/chat/id=${organizationId}`,
- translated: t('chat'),
- view: true,
- },
+ // {
+ // pluginName: 'Chats',
+ // alias: 'chat',
+ // link: `/user/chat/id=${organizationId}`,
+ // translated: t('chat'),
+ // view: true,
+ // },
];
if (localStorage.getItem('talawaPlugins')) {
const talawaPlugins: string = localStorage.getItem('talawaPlugins') || '{}';