({
className = {},
size,
}: LoginButtonProps)
| 33 | }); |
| 34 | |
| 35 | export default function LoginButton({ |
| 36 | className = {}, |
| 37 | size, |
| 38 | }: LoginButtonProps): ReactElement { |
| 39 | const { logEvent } = useLogContext(); |
| 40 | const { showLogin } = useAuthContext(); |
| 41 | const onClick = (copy: ButtonCopy) => { |
| 42 | logEvent(getLogEvent(copy)); |
| 43 | showLogin({ |
| 44 | trigger: AuthTriggers.MainButton, |
| 45 | options: { |
| 46 | isLogin: copy === ButtonCopy.Login, |
| 47 | }, |
| 48 | }); |
| 49 | }; |
| 50 | |
| 51 | return ( |
| 52 | <span className={classNames('flex flex-row', className?.container)}> |
| 53 | <Button |
| 54 | onClick={() => onClick(ButtonCopy.Login)} |
| 55 | variant={ButtonVariant.Secondary} |
| 56 | size={size} |
| 57 | className={className?.button} |
| 58 | > |
| 59 | {ButtonCopy.Login} |
| 60 | </Button> |
| 61 | <Button |
| 62 | onClick={() => onClick(ButtonCopy.Signup)} |
| 63 | variant={ButtonVariant.Primary} |
| 64 | size={size} |
| 65 | className={className?.button} |
| 66 | > |
| 67 | {ButtonCopy.Signup} |
| 68 | </Button> |
| 69 | </span> |
| 70 | ); |
| 71 | } |
nothing calls this directly
no test coverage detected