Move challenge urls into config

This commit is contained in:
Fedor Indutny 2023-04-06 14:49:24 -07:00 committed by GitHub
parent 7f772e49b6
commit 3e586be46a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 10 deletions

View file

@ -8,6 +8,7 @@ import type { StateType } from '../reducer';
import { getIntl } from '../selectors/user';
import { isChallengePending } from '../selectors/network';
import { getChallengeURL } from '../../challenge';
import * as log from '../../logging/log';
const mapStateToProps = (state: StateType) => {
return {
@ -16,7 +17,9 @@ const mapStateToProps = (state: StateType) => {
i18n: getIntl(state),
onContinue() {
document.location.href = getChallengeURL();
const url = getChallengeURL('chat');
log.info(`CaptchaDialog: navigating to ${url}`);
document.location.href = url;
},
};
};