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 [loading, setLoading] = useState(false);
const handleClick = async () => { const handleClick = async () => {
setLoading(true); setLoading(true);
await oidcAuth.preparePopup(); try {
await oidcAuth.preparePopup();
} catch (e) {
setLoading(false);
return;
}
setLoading(false); setLoading(false);
}; };

Loading…
Cancel
Save