1- import { useQuery as useApolloQuery } from "@apollo/client " ;
2- import { type AvailableExternalAuthenticationsQuery } from "@dashboard/graphql" ;
1+ import { useAvailableExternalAuthenticationsQuery } from "@dashboard/graphql " ;
2+ import { useAvailableExternalAuthenticationsStagingQuery } from "@dashboard/graphql/hooksStaging.generated " ;
33import { isMainSchema , isStagingSchema } from "@dashboard/graphql/schemaVersion" ;
4- import {
5- type AvailableExternalAuthenticationsStagingQuery ,
6- PasswordLoginModeEnum ,
7- } from "@dashboard/graphql/staging" ;
4+ import { PasswordLoginModeEnum } from "@dashboard/graphql/staging" ;
85import useNavigator from "@dashboard/hooks/useNavigator" ;
96import { getAppMountUriForRedirect } from "@dashboard/utils/urls" ;
107import { useEffect } from "react" ;
@@ -15,8 +12,6 @@ import LoginPage from "../components/LoginPage";
1512import { type LoginFormData } from "../components/LoginPage/types" ;
1613import { useAuthParameters } from "../hooks/useAuthParameters" ;
1714import { useLastLoginMethod } from "../hooks/useLastLoginMethod" ;
18- import { availableExternalAuthentications as availableExternalAuthenticationsQuery } from "../queries" ;
19- import { availableExternalAuthenticationsStaging as availableExternalAuthenticationsStagingQuery } from "../queries.staging" ;
2015import { loginCallbackPath , type LoginUrlQueryParams } from "../urls" ;
2116import { useUser } from "../useUser" ;
2217
@@ -40,18 +35,15 @@ const LoginView = ({ params }: LoginViewProps) => {
4035 const isCallbackFlow = ! ! ( params . code && params . state && isCallbackPath ) ;
4136
4237 const { data : externalAuthenticationsMain , loading : externalAuthenticationsLoadingMain } =
43- useApolloQuery < AvailableExternalAuthenticationsQuery > ( availableExternalAuthenticationsQuery , {
38+ useAvailableExternalAuthenticationsQuery ( {
4439 skip : isCallbackFlow || isStagingSchema ( ) ,
4540 fetchPolicy : "network-only" ,
4641 } ) ;
4742 const { data : externalAuthenticationsStaging , loading : externalAuthenticationsLoadingStaging } =
48- useApolloQuery < AvailableExternalAuthenticationsStagingQuery > (
49- availableExternalAuthenticationsStagingQuery ,
50- {
51- skip : isCallbackFlow || isMainSchema ( ) ,
52- fetchPolicy : "network-only" ,
53- } ,
54- ) ;
43+ useAvailableExternalAuthenticationsStagingQuery ( {
44+ skip : isCallbackFlow || isMainSchema ( ) ,
45+ fetchPolicy : "network-only" ,
46+ } ) ;
5547 const externalAuthentications = isStagingSchema ( )
5648 ? externalAuthenticationsStaging
5749 : externalAuthenticationsMain ;
0 commit comments