import React from 'react' import { GOOGLE_CLIENT_ID } from '@app/configs' import { GoogleIcon } from '@app/components/badges' import { GoogleLogin } from 'react-google-login' import { Button } from './buttons' interface GoogleLoginButton { onSuccess?: (a: any) => Promise loginView?: boolean skeleton?: boolean // skeleton ui round?: boolean } // returns google login component if id enabled or mock export const GoogleLoginButton = (props: GoogleLoginButton) => { const { onSuccess, skeleton, loginView, round } = props ?? {} // hide btn if no client id found if (!GOOGLE_CLIENT_ID) { return null } if (!skeleton) { return ( { console.error(err) }} cookiePolicy={'single_host_origin'} render={(renderProps: any) => ( )} /> ) } return ( ) }