@@ -155,61 +155,63 @@ export default function Modal(props: ModalProps) {
155155
156156 const modalClassName = `w3a-modal ${ isDark ? "" : " w3a-modal--light" } ` ;
157157 return (
158- < div id = "w3a-modal" className = { modalClassName } style = { { display : ! modalState . modalVisibilityDelayed ? "none" : "flex" } } >
159- < div className = { modalTransitionClasses . join ( " " ) } >
160- < Header onClose = { closeModal } appLogo = { appLogo } />
161- { modalState . status !== MODAL_STATUS . INITIALIZED ? (
162- < div className = "w3a-modal__content w3ajs-content" >
163- { modalState . detailedLoaderAdapter ? (
164- < AdapterLoader
165- onClose = { onCloseLoader }
166- appLogo = { appLogo }
167- modalStatus = { modalState . status }
168- message = { modalState . postLoadingMessage }
169- adapter = { modalState . detailedLoaderAdapter }
170- />
171- ) : (
172- < Loader onClose = { onCloseLoader } modalStatus = { modalState . status } message = { modalState . postLoadingMessage } />
173- ) }
174- </ div >
175- ) : (
176- < div className = "w3a-modal__content w3ajs-content" >
177- { areSocialLoginsVisible && ! modalState . externalWalletsVisibility ? (
178- < >
179- < SocialLogins
180- handleSocialLoginClick = { ( params : SocialLoginEventType ) => preHandleSocialWalletClick ( params ) }
181- socialLoginsConfig = { modalState . socialLoginsConfig }
158+ modalState . modalVisibilityDelayed && (
159+ < div id = "w3a-modal" className = { modalClassName } style = { { display : "flex" } } >
160+ < div className = { modalTransitionClasses . join ( " " ) } >
161+ < Header onClose = { closeModal } appLogo = { appLogo } />
162+ { modalState . status !== MODAL_STATUS . INITIALIZED ? (
163+ < div className = "w3a-modal__content w3ajs-content" >
164+ { modalState . detailedLoaderAdapter ? (
165+ < AdapterLoader
166+ onClose = { onCloseLoader }
167+ appLogo = { appLogo }
168+ modalStatus = { modalState . status }
169+ message = { modalState . postLoadingMessage }
170+ adapter = { modalState . detailedLoaderAdapter }
182171 />
183-
184- { modalState . socialLoginsConfig . loginMethods [ LOGIN_PROVIDER . EMAIL_PASSWORDLESS ] . showOnModal && (
185- < SocialLoginEmail
186- adapter = { modalState . socialLoginsConfig ?. adapter }
172+ ) : (
173+ < Loader onClose = { onCloseLoader } modalStatus = { modalState . status } message = { modalState . postLoadingMessage } />
174+ ) }
175+ </ div >
176+ ) : (
177+ < div className = "w3a-modal__content w3ajs-content" >
178+ { areSocialLoginsVisible && ! modalState . externalWalletsVisibility ? (
179+ < >
180+ < SocialLogins
187181 handleSocialLoginClick = { ( params : SocialLoginEventType ) => preHandleSocialWalletClick ( params ) }
182+ socialLoginsConfig = { modalState . socialLoginsConfig }
188183 />
189- ) }
190-
191- { /* button to show external wallets */ }
192- { modalState . hasExternalWallets && externalWalletButton }
193- </ >
194- ) : (
195- < ExternalWallets
196- modalStatus = { modalState . status }
197- showBackButton = { areSocialLoginsVisible }
198- handleExternalWalletClick = { ( params : ExternalWalletEventType ) => preHandleExternalWalletClick ( params ) }
199- walletConnectUri = { modalState . walletConnectUri }
200- config = { modalState . externalWalletsConfig }
201- hideExternalWallets = { ( ) =>
202- setModalState ( ( prevState ) => {
203- return { ...prevState , externalWalletsVisibility : false } ;
204- } )
205- }
206- />
207- ) }
208- </ div >
209- ) }
210-
211- < Footer version = { version } />
184+
185+ { modalState . socialLoginsConfig . loginMethods [ LOGIN_PROVIDER . EMAIL_PASSWORDLESS ] . showOnModal && (
186+ < SocialLoginEmail
187+ adapter = { modalState . socialLoginsConfig ?. adapter }
188+ handleSocialLoginClick = { ( params : SocialLoginEventType ) => preHandleSocialWalletClick ( params ) }
189+ />
190+ ) }
191+
192+ { /* button to show external wallets */ }
193+ { modalState . hasExternalWallets && externalWalletButton }
194+ </ >
195+ ) : (
196+ < ExternalWallets
197+ modalStatus = { modalState . status }
198+ showBackButton = { areSocialLoginsVisible }
199+ handleExternalWalletClick = { ( params : ExternalWalletEventType ) => preHandleExternalWalletClick ( params ) }
200+ walletConnectUri = { modalState . walletConnectUri }
201+ config = { modalState . externalWalletsConfig }
202+ hideExternalWallets = { ( ) =>
203+ setModalState ( ( prevState ) => {
204+ return { ...prevState , externalWalletsVisibility : false } ;
205+ } )
206+ }
207+ />
208+ ) }
209+ </ div >
210+ ) }
211+
212+ < Footer version = { version } />
213+ </ div >
212214 </ div >
213- </ div >
215+ )
214216 ) ;
215217}
0 commit comments