@@ -12,6 +12,7 @@ import {
12
12
} from "@asyncstatus/api/typed-handlers/discord-gateway" ;
13
13
import {
14
14
deleteDiscordIntegrationContract ,
15
+ discordAddIntegrationCallbackContract ,
15
16
discordIntegrationCallbackContract ,
16
17
fetchDiscordMessagesContract ,
17
18
getDiscordIntegrationContract ,
@@ -30,6 +31,7 @@ import {
30
31
import {
31
32
deleteGitlabIntegrationContract ,
32
33
getGitlabIntegrationContract ,
34
+ gitlabIntegrationCallbackAddContract ,
33
35
gitlabIntegrationCallbackContract ,
34
36
listGitlabProjectsContract ,
35
37
listGitlabUsersContract ,
@@ -55,6 +57,7 @@ import {
55
57
getSlackIntegrationContract ,
56
58
listSlackChannelsContract ,
57
59
listSlackUsersContract ,
60
+ slackAddIntegrationCallbackContract ,
58
61
slackIntegrationCallbackContract ,
59
62
} from "@asyncstatus/api/typed-handlers/slack-integration" ;
60
63
import {
@@ -102,10 +105,13 @@ import {
102
105
XIcon ,
103
106
} from "@asyncstatus/ui/icons" ;
104
107
import { useMutation , useQuery , useQueryClient } from "@tanstack/react-query" ;
105
- import { createFileRoute , Link , useNavigate } from "@tanstack/react-router" ;
108
+ import { createFileRoute , Link , useNavigate , useRouter } from "@tanstack/react-router" ;
106
109
import { Fragment , useMemo , useState } from "react" ;
107
110
import { z } from "zod/v4" ;
108
- import { sessionBetterAuthQueryOptions } from "@/better-auth-tanstack-query" ;
111
+ import {
112
+ loginSocialMutationOptions ,
113
+ sessionBetterAuthQueryOptions ,
114
+ } from "@/better-auth-tanstack-query" ;
109
115
import {
110
116
IntegrationSettingsItem ,
111
117
IntegrationSuggestionItem ,
@@ -791,7 +797,7 @@ function RouteComponent() {
791
797
: "disconnected" ,
792
798
connectLink : getSlackIntegrationConnectUrl ( {
793
799
clientId : import . meta. env . VITE_SLACK_INTEGRATION_APP_CLIENT_ID ,
794
- redirectUri : typedUrl ( slackIntegrationCallbackContract , { } ) ,
800
+ redirectUri : typedUrl ( slackAddIntegrationCallbackContract , { } as any ) ,
795
801
organizationSlug : params . organizationSlug ,
796
802
} ) ,
797
803
onDisconnect : ( ) => {
@@ -1015,7 +1021,7 @@ function RouteComponent() {
1015
1021
: "disconnected" ,
1016
1022
connectLink : getDiscordIntegrationConnectUrl ( {
1017
1023
clientId : import . meta. env . VITE_DISCORD_INTEGRATION_APP_CLIENT_ID ,
1018
- redirectUri : typedUrl ( discordIntegrationCallbackContract , { } ) ,
1024
+ redirectUri : typedUrl ( discordAddIntegrationCallbackContract , { } as any ) ,
1019
1025
organizationSlug : params . organizationSlug ,
1020
1026
} ) ,
1021
1027
onDisconnect : ( ) => {
@@ -1452,7 +1458,7 @@ function RouteComponent() {
1452
1458
: "disconnected" ,
1453
1459
connectLink : getGitlabIntegrationConnectUrl ( {
1454
1460
clientId : import . meta. env . VITE_GITLAB_INTEGRATION_APP_CLIENT_ID ,
1455
- redirectUri : import . meta . env . VITE_API_URL + gitlabIntegrationCallbackContract . url ( ) ,
1461
+ redirectUri : typedUrl ( gitlabIntegrationCallbackAddContract , { } as any ) ,
1456
1462
organizationSlug : params . organizationSlug ,
1457
1463
instanceUrl : "https://gitlab.com" , // Default to GitLab.com
1458
1464
} ) ,
0 commit comments