Fix Jira widget request loop for logged-out users (#507)

* Fix Jira widget request loop for logged-out users

* Add changelog file

(copied from #502)
This commit is contained in:
Andrew Ferrazzutti 2022-10-03 10:30:11 -04:00 committed by GitHub
parent fa85dc070b
commit 50fa037d9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
changelog.d/507.bugfix Normal file
View File

@ -0,0 +1 @@
Add a configuration widget for Jira.

View File

@ -76,7 +76,7 @@ const ConnectionSearch: FunctionComponent<{api: BridgeAPI, onPicked: (state: Jir
}
// Things break if we depend on the thing we are clearing.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [searchFn, filter, isConnected, instances]);
}, [searchFn, filter]);
const onInstancePicked = useCallback((evt: InputEvent) => {
// Reset the search string.
@ -97,7 +97,7 @@ const ConnectionSearch: FunctionComponent<{api: BridgeAPI, onPicked: (state: Jir
return <div>
{instances === null && <p> Loading JIRA connection. </p>}
{isConnected === null && <p> Loading JIRA connection. </p>}
{isConnected === false && <p> You are not logged into JIRA. </p>}
{isConnected === true && instances?.length === 0 && <p> You are not connected to any JIRA instances. </p>}
{searchError && <ErrorPane> {searchError} </ErrorPane> }