0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-24 22:41:28 -05:00

refactor(ui): rename native supported connctors param name (#888)

rename native supported connctors param name
This commit is contained in:
simeng-li 2022-05-19 14:21:21 +08:00 committed by GitHub
parent 9fa13a24ae
commit 85e475d85e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -28,7 +28,7 @@ describe('SecondarySocialSignIn', () => {
platform: 'web', platform: 'web',
getPostMessage: jest.fn(() => jest.fn()), getPostMessage: jest.fn(() => jest.fn()),
callbackLink: '/logto:', callbackLink: '/logto:',
supportedSocialConnectorIds: socialConnectors.map(({ id }) => id), supportedSocialConnectorTargets: socialConnectors.map(({ id }) => id),
}; };
/* eslint-enable @silverhand/fp/no-mutation */ /* eslint-enable @silverhand/fp/no-mutation */
}); });

View file

@ -33,7 +33,7 @@ describe('filterSocialConnectors', () => {
// @ts-expect-error mock global object // @ts-expect-error mock global object
globalThis.logtoNativeSdk = { globalThis.logtoNativeSdk = {
platform: 'ios', platform: 'ios',
supportedSocialConnectorIds: ['Web', 'WeChat'], supportedSocialConnectorTargets: ['Web', 'WeChat'],
}; };
/* eslint-enable @silverhand/fp/no-mutation */ /* eslint-enable @silverhand/fp/no-mutation */

View file

@ -104,7 +104,7 @@ export const filterSocialConnectors = (socialConnectors?: ConnectorData[]) => {
**/ **/
if ( if (
platform === 'Native' && platform === 'Native' &&
getLogtoNativeSdk()?.supportedSocialConnectorIds.includes(target) getLogtoNativeSdk()?.supportedSocialConnectorTargets.includes(target)
) { ) {
connectorMap.set(target, connector); connectorMap.set(target, connector);
continue; continue;

View file

@ -4,7 +4,7 @@ type LogtoNativeSdkInfo = {
platform: 'ios' | 'android'; platform: 'ios' | 'android';
callbackLink: string; callbackLink: string;
getPostMessage: () => (data: { callbackUri?: string; redirectTo?: string }) => void; getPostMessage: () => (data: { callbackUri?: string; redirectTo?: string }) => void;
supportedSocialConnectorIds: string[]; supportedSocialConnectorTargets: string[];
}; };
declare const logtoNativeSdk: LogtoNativeSdkInfo | undefined; declare const logtoNativeSdk: LogtoNativeSdkInfo | undefined;