mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 13:17:08 +00:00
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:
parent
fa85dc070b
commit
50fa037d9a
1
changelog.d/507.bugfix
Normal file
1
changelog.d/507.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Add a configuration widget for Jira.
|
@ -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> }
|
||||
|
Loading…
x
Reference in New Issue
Block a user