@@ -5,18 +5,13 @@ import type { Ref } from 'react';
55import { Button , SubmitButton } from '../../../components/button' ;
66import { Card } from '../../../components/card' ;
77import { useFlowAutoFocus } from '../../../components/flow' ;
8- import { ProviderButton , ProviderButtonGroup } from '../../../components/provider-button' ;
98import { Text } from '../../../components/text' ;
109import { fill , useMessages } from '../../../localization' ;
1110import { styles } from '../sign-in.styles' ;
12- import type { SignInSocialProvider } from '../sign-in.types' ;
1311
1412interface SignInEnterpriseSsoProps {
1513 applicationName : string ;
1614 logo ?: { src : string ; alt : string } ;
17- connections ?: readonly SignInSocialProvider [ ] ;
18- pendingConnectionId ?: string ;
19- onSelectConnection : ( id : string ) => void ;
2015 globalErrorMessage ?: string ;
2116 isPending : boolean ;
2217 onSubmit : ( ) => void ;
@@ -27,9 +22,6 @@ interface SignInEnterpriseSsoProps {
2722export function SignInEnterpriseSso ( {
2823 applicationName,
2924 logo,
30- connections = [ ] ,
31- pendingConnectionId,
32- onSelectConnection,
3325 globalErrorMessage,
3426 isPending,
3527 onSubmit,
@@ -38,8 +30,6 @@ export function SignInEnterpriseSso({
3830} : SignInEnterpriseSsoProps ) {
3931 const m = useMessages ( 'signIn' ) ;
4032 const ref = useMergeRefs < HTMLElement > ( [ focusRef , useFlowAutoFocus < HTMLButtonElement > ( ) ] ) ;
41- const choosing = connections . length > 1 ;
42- const busy = isPending || Boolean ( pendingConnectionId ) ;
4333
4434 return (
4535 < >
@@ -53,8 +43,8 @@ export function SignInEnterpriseSso({
5343 />
5444 </ Card . Media >
5545 ) : null }
56- < Card . Title > { choosing ? m . enterpriseSso . chooseTitle : fill ( m . start . title , { applicationName } ) } </ Card . Title >
57- < Card . Description > { choosing ? m . enterpriseSso . chooseDescription : m . start . description } </ Card . Description >
46+ < Card . Title > { fill ( m . start . title , { applicationName } ) } </ Card . Title >
47+ < Card . Description > { m . start . description } </ Card . Description >
5848 </ Card . Header >
5949 < Card . Banner
6050 role = 'alert'
@@ -63,42 +53,16 @@ export function SignInEnterpriseSso({
6353 { globalErrorMessage }
6454 </ Card . Banner >
6555 < Card . Content >
66- { choosing ? (
67- < ProviderButtonGroup
68- layout = 'stacked'
69- disabled = { Boolean ( pendingConnectionId ) }
70- >
71- { connections . map ( ( connection , index ) => (
72- < ProviderButton
73- key = { connection . id }
74- ref = { index === 0 ? ref : undefined }
75- icon = {
76- < img
77- src = { connection . iconUrl }
78- alt = ''
79- { ...stylex . props ( styles . providerIcon ) }
80- />
81- }
82- longLabel = { connection . name }
83- shortLabel = { connection . name }
84- isPending = { pendingConnectionId === connection . id }
85- pendingLabel = { m . enterpriseSso . pending }
86- onClick = { ( ) => onSelectConnection ( connection . id ) }
87- />
88- ) ) }
89- </ ProviderButtonGroup >
90- ) : (
91- < SubmitButton
92- ref = { ref }
93- type = 'button'
94- fullWidth
95- isPending = { isPending }
96- pendingLabel = { m . enterpriseSso . pending }
97- onClick = { onSubmit }
98- >
99- { m . enterpriseSso . continue }
100- </ SubmitButton >
101- ) }
56+ < SubmitButton
57+ ref = { ref }
58+ type = 'button'
59+ fullWidth
60+ isPending = { isPending }
61+ pendingLabel = { m . enterpriseSso . pending }
62+ onClick = { onSubmit }
63+ >
64+ { m . enterpriseSso . continue }
65+ </ SubmitButton >
10266 { onCancel ? (
10367 < Text
10468 size = 'sm'
@@ -109,7 +73,7 @@ export function SignInEnterpriseSso({
10973 size = 'sm'
11074 variant = 'link'
11175 color = 'neutral'
112- disabled = { busy }
76+ disabled = { isPending }
11377 onClick = { onCancel }
11478 >
11579 { m . enterpriseSso . bypass }
0 commit comments