From 4e15ba78d584405f5a24c1396fca5db2d0590142 Mon Sep 17 00:00:00 2001 From: hagen-danswer Date: Tue, 18 Jun 2024 11:47:06 -0400 Subject: [PATCH] replicated drive fix for gmail connector (#1658) --- web/src/app/admin/connectors/gmail/page.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/web/src/app/admin/connectors/gmail/page.tsx b/web/src/app/admin/connectors/gmail/page.tsx index e81db40047ce..f0800d293e43 100644 --- a/web/src/app/admin/connectors/gmail/page.tsx +++ b/web/src/app/admin/connectors/gmail/page.tsx @@ -141,9 +141,16 @@ const Main = () => { const { popup, setPopup } = usePopup(); + const appCredentialSuccessfullyFetched = + appCredentialData || + (isAppCredentialError && isAppCredentialError.status === 404); + const serviceAccountKeySuccessfullyFetched = + serviceAccountKeyData || + (isServiceAccountKeyError && isServiceAccountKeyError.status === 404); + if ( - (!appCredentialData && isAppCredentialLoading) || - (!serviceAccountKeyData && isServiceAccountKeyLoading) || + (!appCredentialSuccessfullyFetched && isAppCredentialLoading) || + (!serviceAccountKeySuccessfullyFetched && isServiceAccountKeyLoading) || (!connectorIndexingStatuses && isConnectorIndexingStatusesLoading) || (!credentialsData && isCredentialsLoading) ) { @@ -170,7 +177,10 @@ const Main = () => { ); } - if (isAppCredentialError || isServiceAccountKeyError) { + if ( + !appCredentialSuccessfullyFetched || + !serviceAccountKeySuccessfullyFetched + ) { return (