fix(client): update store after any submission (#41329)
This commit is contained in:
@@ -31,9 +31,9 @@ export class SolutionForm extends Component {
|
||||
handleSubmit(validatedValues) {
|
||||
// Do not execute challenge, if errors
|
||||
if (validatedValues.errors.length === 0) {
|
||||
// updates values on store
|
||||
this.props.updateSolutionForm(validatedValues.values);
|
||||
if (validatedValues.invalidValues.length === 0) {
|
||||
// updates values on server
|
||||
this.props.updateSolutionForm(validatedValues.values);
|
||||
this.props.onSubmit({ isShouldCompletionModalOpen: true });
|
||||
} else {
|
||||
this.props.onSubmit({ isShouldCompletionModalOpen: false });
|
||||
@@ -59,7 +59,8 @@ export class SolutionForm extends Component {
|
||||
githubLink: 'url'
|
||||
},
|
||||
required: ['solution'],
|
||||
isEditorLinkAllowed: false
|
||||
isEditorLinkAllowed: false,
|
||||
isLocalLinkAllowed: false
|
||||
};
|
||||
|
||||
const buttonCopy = isSubmitting
|
||||
@@ -79,6 +80,7 @@ export class SolutionForm extends Component {
|
||||
|
||||
case backend:
|
||||
formFields = solutionField;
|
||||
options.isLocalLinkAllowed = true;
|
||||
solutionLink = solutionLink + 'https://project-name.camperbot.repl.co/';
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user