Skip to content

Commit 329fc27

Browse files
authored
remove query param condition to display bconnect button (#290)
1 parent c1302e6 commit 329fc27

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

src/components/form/socialButtonsComponent.tsx

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import classes from 'classnames';
33
import React, { PropsWithChildren, useCallback } from 'react';
44
import styled, { useTheme } from 'styled-components';
55

6-
import { parseQueryString } from '../../helpers/queryString';
7-
86
import type { Provider, ProviderId } from '../../providers/providers';
97
import { providers as socialProviders } from '../../providers/providers';
108

@@ -172,25 +170,22 @@ export const SocialButtons = styled(
172170
[coreClient, auth]
173171
);
174172

175-
const queryParams = parseQueryString(window.location.search.substring(1));
176173
return (
177174
<div className={classes(['r5-social-buttons', className])}>
178175
{providers.flatMap(providerKey => {
179176
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) {
183178
console.error(`${providerName} provider not found.`);
184179
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+
];
194189
})}
195190
</div>
196191
);

0 commit comments

Comments
 (0)