mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 21:29:08 +03:00
fix: close github authorization window (#29617)
This commit is contained in:
1 parent
47d2ab8976
commit
cca2b8fba3
1 file changed
+4
-2
@@ -4,7 +4,7 @@ import { useParams } from 'common'
|
||||
import { useGitHubAuthorizationCreateMutation } from 'data/integrations/github-authorization-create-mutation'
|
||||
|
||||
const GitHubIntegrationAuthorize = () => {
|
||||
const { code, state } = useParams()
|
||||
const { code, state, setup_action } = useParams()
|
||||
|
||||
const { mutate, isSuccess, isError, isLoading } = useGitHubAuthorizationCreateMutation({
|
||||
onSuccess() {
|
||||
@@ -15,8 +15,10 @@ const GitHubIntegrationAuthorize = () => {
|
||||
useEffect(() => {
|
||||
if (code && state) {
|
||||
mutate({ code, state })
|
||||
} else if (setup_action === 'install') {
|
||||
window.close()
|
||||
}
|
||||
}, [code, state, mutate])
|
||||
}, [code, state, mutate, setup_action])
|
||||
|
||||
return (
|
||||
<div className="h-screen flex flex-col justify-center items-center gap-4">
|
||||
|
||||
Reference in new issue
Block a user