mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-29 17:20:44 +02:00
Fix google drive connector page refresh
This commit is contained in:
@ -293,9 +293,16 @@ const Main = () => {
|
|||||||
|
|
||||||
const { popup, setPopup } = usePopup();
|
const { popup, setPopup } = usePopup();
|
||||||
|
|
||||||
|
const appCredentialSuccessfullyFetched =
|
||||||
|
appCredentialData ||
|
||||||
|
(isAppCredentialError && isAppCredentialError.status === 404);
|
||||||
|
const serviceAccountKeySuccessfullyFetched =
|
||||||
|
serviceAccountKeyData ||
|
||||||
|
(isServiceAccountKeyError && isServiceAccountKeyError.status === 404);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(!appCredentialData && isAppCredentialLoading) ||
|
(!appCredentialSuccessfullyFetched && isAppCredentialLoading) ||
|
||||||
(!serviceAccountKeyData && isServiceAccountKeyLoading) ||
|
(!serviceAccountKeySuccessfullyFetched && isServiceAccountKeyLoading) ||
|
||||||
(!connectorIndexingStatuses && isConnectorIndexingStatusesLoading) ||
|
(!connectorIndexingStatuses && isConnectorIndexingStatusesLoading) ||
|
||||||
(!credentialsData && isCredentialsLoading)
|
(!credentialsData && isCredentialsLoading)
|
||||||
) {
|
) {
|
||||||
@ -315,8 +322,8 @@ const Main = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(isAppCredentialError && isAppCredentialError.status !== 404) ||
|
!appCredentialSuccessfullyFetched ||
|
||||||
(isServiceAccountKeyError && isServiceAccountKeyError.status !== 404)
|
!serviceAccountKeySuccessfullyFetched
|
||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
<ErrorCallout errorTitle="Error loading Google Drive app credentials. Contact an administrator." />
|
<ErrorCallout errorTitle="Error loading Google Drive app credentials. Contact an administrator." />
|
||||||
|
Reference in New Issue
Block a user