@@ -43,7 +43,6 @@ import { TOKEN_COOKIE_NAME, URLS } from '../../config'
43
43
import { getSSOConfigList } from '../../Pages/GlobalConfigurations/Authorization/SSOLoginServices/service'
44
44
import { dashboardAccessed } from '../../services/service'
45
45
import { LOGIN_CARD_ANIMATION_VARIANTS , SSOProvider } from './constants'
46
- import { SSOConfigLoginList } from './login.types'
47
46
import { LoginForm } from './LoginForm'
48
47
49
48
import './login.scss'
@@ -54,14 +53,15 @@ const getTermsAndConditions = importComponentFromFELibrary('getTermsAndCondition
54
53
55
54
const Login = ( ) => {
56
55
const [ continueUrl , setContinueUrl ] = useState ( '' )
57
- const [ loginList , setLoginList ] = useState < SSOConfigLoginList [ ] > ( [ ] )
58
56
59
57
const { searchParams } = useSearchString ( )
60
58
const location = useLocation ( )
61
59
const history = useHistory ( )
62
60
63
61
const [ ssoListLoading , ssoListResponse ] = useAsync ( getSSOConfigList , [ ] )
64
62
63
+ const loginList = ssoListResponse ?. result ?? [ ]
64
+
65
65
const setLoginNavigationURL = ( ) => {
66
66
let queryParam = searchParams . continue
67
67
@@ -100,12 +100,6 @@ const Login = () => {
100
100
dashboardAccessed ( )
101
101
} , [ ] )
102
102
103
- useEffect ( ( ) => {
104
- if ( ssoListResponse ?. result && ! ssoListLoading ) {
105
- setLoginList ( ssoListResponse . result as SSOConfigLoginList [ ] )
106
- }
107
- } , [ ssoListLoading , ssoListResponse ] )
108
-
109
103
const onClickSSO = ( ) => {
110
104
if ( typeof Storage !== 'undefined' ) {
111
105
localStorage . setItem ( 'isSSOLogin' , 'true' )
0 commit comments