diff options
author | 2023-01-18 16:41:00 +0100 | |
---|---|---|
committer | 2023-01-18 16:41:00 +0100 | |
commit | 747683ba54aa7e9cfe56542696c756c6ae225275 (patch) | |
tree | b3a3796a7df58fd93398b560a6c5cc1e9dd958d8 /web/source/settings/components/authorization/index.jsx | |
parent | [chore] Fix new emoji preview title/alt text (#1354) (diff) | |
download | gotosocial-747683ba54aa7e9cfe56542696c756c6ae225275.tar.xz |
[chore] Settings refactor fix 2 (#1357)
* fix emoji query tagging
* fix proxy url for gts instance
* fix: don't flash callback error on authorize flow
Diffstat (limited to 'web/source/settings/components/authorization/index.jsx')
-rw-r--r-- | web/source/settings/components/authorization/index.jsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/web/source/settings/components/authorization/index.jsx b/web/source/settings/components/authorization/index.jsx index 8bcf68e09..397413945 100644 --- a/web/source/settings/components/authorization/index.jsx +++ b/web/source/settings/components/authorization/index.jsx @@ -28,17 +28,18 @@ const Loading = require("../loading"); const { Error } = require("../error"); module.exports = function Authorization({ App }) { - const loginState = Redux.useSelector((state) => state.oauth.loginState); - const [hasStoredLogin] = React.useState(loginState != "none" && loginState != "logout"); + const { loginState, expectingRedirect } = Redux.useSelector((state) => state.oauth); const { isLoading, isSuccess, data: account, error } = query.useVerifyCredentialsQuery(undefined, { - skip: loginState == "none" || loginState == "logout" + skip: loginState == "none" || loginState == "logout" || expectingRedirect }); + console.log("skip verify:", loginState, expectingRedirect); + let showLogin = true; let content = null; - if (isLoading && hasStoredLogin) { + if (isLoading) { showLogin = false; let loadingInfo; |