(message: string)
| 187 | const [socialError, setSocialError] = useState<string>(); |
| 188 | const socialProviderRef = useRef<string>(); |
| 189 | const onSocialError = (message: string) => { |
| 190 | if (!isStartups) { |
| 191 | displayToast(message); |
| 192 | return; |
| 193 | } |
| 194 | |
| 195 | if (message !== SOCIAL_AUTH_RETRY_MESSAGE) { |
| 196 | setSocialError(message); |
| 197 | return; |
| 198 | } |
| 199 | |
| 200 | const label = providers.find( |
| 201 | ({ value }) => value === socialProviderRef.current, |
| 202 | )?.label; |
| 203 | setSocialError( |
| 204 | `${label ?? 'Your provider'} didn't finish signing you in. Try again, or use another option.`, |
| 205 | ); |
| 206 | }; |
| 207 | const [activeDisplay, setActiveDisplay] = useState(() => |
| 208 | storage.getItem(SIGNIN_METHOD_KEY) && !forceDefaultDisplay && !isStartups |
| 209 | ? AuthDisplay.SignBack |
no test coverage detected