fix(oidc login): handle reset loading state

pull/2792/head
Jakob Ankarhem 2 years ago
parent 5886f83bed
commit cefe1fe1ba
No known key found for this signature in database
GPG Key ID: 149CBB661002B3BE

@ -21,7 +21,12 @@ function OIDCLoginButton({ revalidate, oidcName }: Props) {
const [loading, setLoading] = useState(false);
const handleClick = async () => {
setLoading(true);
try {
await oidcAuth.preparePopup();
} catch (e) {
setLoading(false);
return;
}
setLoading(false);
};

Loading…
Cancel
Save