mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-04-28 08:10:36 +00:00
Use tabWidth 4 without actual tabs.
This commit is contained in:
@@ -9,33 +9,33 @@ import { AppContext } from "../../../context/revoltjs/RevoltClient";
|
||||
import Preloader from "../../../components/ui/Preloader";
|
||||
|
||||
export interface CaptchaProps {
|
||||
onSuccess: (token?: string) => void;
|
||||
onCancel: () => void;
|
||||
onSuccess: (token?: string) => void;
|
||||
onCancel: () => void;
|
||||
}
|
||||
|
||||
export function CaptchaBlock(props: CaptchaProps) {
|
||||
const client = useContext(AppContext);
|
||||
const client = useContext(AppContext);
|
||||
|
||||
useEffect(() => {
|
||||
if (!client.configuration?.features.captcha.enabled) {
|
||||
props.onSuccess();
|
||||
}
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
if (!client.configuration?.features.captcha.enabled) {
|
||||
props.onSuccess();
|
||||
}
|
||||
}, []);
|
||||
|
||||
if (!client.configuration?.features.captcha.enabled)
|
||||
return <Preloader type="spinner" />;
|
||||
if (!client.configuration?.features.captcha.enabled)
|
||||
return <Preloader type="spinner" />;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HCaptcha
|
||||
sitekey={client.configuration.features.captcha.key}
|
||||
onVerify={(token) => props.onSuccess(token)}
|
||||
/>
|
||||
<div className={styles.footer}>
|
||||
<a onClick={props.onCancel}>
|
||||
<Text id="login.cancel" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<div>
|
||||
<HCaptcha
|
||||
sitekey={client.configuration.features.captcha.key}
|
||||
onVerify={(token) => props.onSuccess(token)}
|
||||
/>
|
||||
<div className={styles.footer}>
|
||||
<a onClick={props.onCancel}>
|
||||
<Text id="login.cancel" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user