mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-17 21:32:36 +01:00
Fix google drive connector page refresh
This commit is contained in:
parent
7a855192c3
commit
c6d094b2ee
@ -293,9 +293,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)
|
||||
) {
|
||||
@ -315,8 +322,8 @@ const Main = () => {
|
||||
}
|
||||
|
||||
if (
|
||||
(isAppCredentialError && isAppCredentialError.status !== 404) ||
|
||||
(isServiceAccountKeyError && isServiceAccountKeyError.status !== 404)
|
||||
!appCredentialSuccessfullyFetched ||
|
||||
!serviceAccountKeySuccessfullyFetched
|
||||
) {
|
||||
return (
|
||||
<ErrorCallout errorTitle="Error loading Google Drive app credentials. Contact an administrator." />
|
||||
|
Loading…
x
Reference in New Issue
Block a user