From d9e5795b36fc14bfa7f75dd9ee0775989c9c02b2 Mon Sep 17 00:00:00 2001 From: meherhendi Date: Tue, 31 Oct 2023 16:57:13 +0100 Subject: [PATCH] Removing unused codefrom gdrive connector Signed-off-by: meherhendi --- .../admin/connectors/google-drive/page.tsx | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/web/src/app/admin/connectors/google-drive/page.tsx b/web/src/app/admin/connectors/google-drive/page.tsx index 334216e7d..49eec13e5 100644 --- a/web/src/app/admin/connectors/google-drive/page.tsx +++ b/web/src/app/admin/connectors/google-drive/page.tsx @@ -13,7 +13,6 @@ import { GoogleDriveConfig, GoogleDriveCredentialJson, GoogleDriveServiceAccountCredentialJson, - User, } from "@/lib/types"; import { linkCredential } from "@/lib/credential"; import { ConnectorForm } from "@/components/admin/connectors/ConnectorForm"; @@ -277,24 +276,13 @@ const Main = () => { refreshCredentials, } = usePublicCredentials(); - const { - data: currentUserData, - isLoading: iscurrentUserLoading, - error: iscurrentUserError, - } = useSWR( - "/api/manage/me", - fetcher - ); - - const { popup, setPopup } = usePopup(); if ( (!appCredentialData && isAppCredentialLoading) || (!serviceAccountKeyData && isServiceAccountKeyLoading) || (!connectorIndexingStatuses && isConnectorIndexingStatusesLoading) || - (!credentialsData && isCredentialsLoading) || - (!currentUserData && iscurrentUserLoading) + (!credentialsData && isCredentialsLoading) ) { return (
@@ -329,15 +317,6 @@ const Main = () => { ); } - if (iscurrentUserError || !credentialsData) { - return ( -
-
- Error loading user profile. Contact an administrator. -
-
- ); - } const googleDrivePublicCredential: | Credential | undefined = credentialsData.find(