PromucFlow_constructor/app/client/src/ee/constants/SocialLogin.tsx
Pranav Kanade 82cbf718d0
refactor: code splitting to support third party sso/oidc in EE (#10201)
* added config to support code split

* splitting config

* moved the window declaration in EE file as its dependency will be updated in EE

* CE: Splitting ApiConstants and SocialLogin constants

* CE: split login page

* CE: moved getSocialLoginButtonProps func to EE file as it's dependencies will be updated in EE

* added key icon

* CE: created a factory class to share social auths list

* Minor style fix for social btns

* Updated the third party auth styles

* updated jest config

* updated third party login registry class
2022-01-07 11:38:17 +05:30

19 lines
515 B
TypeScript

export * from "ce/constants/SocialLogin";
import {
SocialLoginButtonProps,
SocialLoginButtonPropsList,
SocialLoginType,
} from "ce/constants/SocialLogin";
export const getSocialLoginButtonProps = (
logins: SocialLoginType[],
): SocialLoginButtonProps[] => {
return logins.map((login) => {
const socialLoginButtonProps = SocialLoginButtonPropsList[login];
if (!socialLoginButtonProps) {
throw Error("Social login not registered: " + login);
}
return socialLoginButtonProps;
});
};