Skip to content

Commit

Permalink
Disable bot protection provider card during form loading
Browse files Browse the repository at this point in the history
  • Loading branch information
pkong-ds committed Aug 19, 2024
1 parent 9014621 commit eff5cd0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import PrimaryButton from "../../PrimaryButton";
import { startReauthentication } from "./Authenticated";
import { useSessionStorage } from "../../hook/useSessionStorage";
import HorizontalDivider from "../../HorizontalDivider";
import { useFormLoading } from "../../form";

const MASKED_SECRET = "***************";

Expand Down Expand Up @@ -393,6 +394,8 @@ function ProviderCard(props: ProviderCardProps) {
},
} = useSystemConfig();

const formLoading = useFormLoading();

return (
<button
type="button"
Expand All @@ -402,7 +405,7 @@ function ProviderCard(props: ProviderCardProps) {
className={cn(className, styles.providerCard)}
onClick={disabled ? undefined : onClick}
tabIndex={0}
disabled={disabled}
disabled={formLoading || disabled}
>
{logoSrc != null ? (
<Image src={logoSrc} width={logoWidth} height={logoHeight} />
Expand Down

0 comments on commit eff5cd0

Please sign in to comment.