(props: StartSignUpProps)
| 46 | } |
| 47 | |
| 48 | const startSignUp = async (props: StartSignUpProps) => { |
| 49 | setFlow(props.flow || 'signup'); |
| 50 | setCommunityId(props.communityId); |
| 51 | setCallbackUrl(props.redirectUrl || window.location.href); |
| 52 | const session = await getSession(); |
| 53 | if (session) { |
| 54 | const res = await join({ communityId: props.communityId }); |
| 55 | if (res.ok) { |
| 56 | window.location.replace(props.redirectUrl || window.location.href); |
| 57 | return; |
| 58 | } |
| 59 | } |
| 60 | setOpen(!open); |
| 61 | }; |
| 62 | |
| 63 | const onSuccessfulSignIn = async () => { |
| 64 | const session = await getSession(); |
no test coverage detected