@@ -3,8 +3,6 @@ import classes from 'classnames';
3
3
import React , { PropsWithChildren , useCallback } from 'react' ;
4
4
import styled , { useTheme } from 'styled-components' ;
5
5
6
- import { parseQueryString } from '../../helpers/queryString' ;
7
-
8
6
import type { Provider , ProviderId } from '../../providers/providers' ;
9
7
import { providers as socialProviders } from '../../providers/providers' ;
10
8
@@ -172,25 +170,22 @@ export const SocialButtons = styled(
172
170
[ coreClient , auth ]
173
171
) ;
174
172
175
- const queryParams = parseQueryString ( window . location . search . substring ( 1 ) ) ;
176
173
return (
177
174
< div className = { classes ( [ 'r5-social-buttons' , className ] ) } >
178
175
{ providers . flatMap ( providerKey => {
179
176
const [ providerName ] = providerKey . split ( ':' ) ;
180
- if ( providerName === 'bconnect' && queryParams . bconnectActivation !== 'true' )
181
- return [ ] ;
182
- else if ( socialProviders [ providerName as ProviderId ] === undefined ) {
177
+ if ( socialProviders [ providerName as ProviderId ] === undefined ) {
183
178
console . error ( `${ providerName } provider not found.` ) ;
184
179
return [ ] ;
185
- } else
186
- return [
187
- < SocialButton
188
- provider = { socialProviders [ providerName as ProviderId ] }
189
- count = { providers . length }
190
- onClick = { ( ) => clickHandler ( providerKey ) }
191
- key = { providerKey }
192
- /> ,
193
- ] ;
180
+ }
181
+ return [
182
+ < SocialButton
183
+ provider = { socialProviders [ providerName as ProviderId ] }
184
+ count = { providers . length }
185
+ onClick = { ( ) => clickHandler ( providerKey ) }
186
+ key = { providerKey }
187
+ /> ,
188
+ ] ;
194
189
} ) }
195
190
</ div >
196
191
) ;
0 commit comments