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