@@ -474,6 +474,7 @@ class ChallengesTagSort extends React.Component {
474
474
'It seems like you submitted an incorrect flag "' + values . flag + '" for "' + this . state . viewingChallengeDetails . name + '".' ,
475
475
duration : 3
476
476
} ) ;
477
+ this . loadChallengeDetails ( this . state . currentChallenge , false )
477
478
}
478
479
}
479
480
else {
@@ -484,6 +485,7 @@ class ChallengesTagSort extends React.Component {
484
485
'It seems like you have execeeded the maximum number of attempts for "' + this . state . viewingChallengeDetails . name + '". Contact an admin if you need more tries.' ,
485
486
duration : 3
486
487
} ) ;
488
+ this . loadChallengeDetails ( this . state . currentChallenge , false )
487
489
}
488
490
else if ( data . error === "submitted" ) {
489
491
notification [ "error" ] ( {
@@ -492,6 +494,7 @@ class ChallengesTagSort extends React.Component {
492
494
'Your teammate might have already solved the challenge. Please refresh the page to see the latest solve status.' ,
493
495
duration : 3
494
496
} ) ;
497
+ await this . props . handleRefresh ( )
495
498
}
496
499
else if ( data . error === "admin-hidden" ) {
497
500
notification [ "error" ] ( {
@@ -500,6 +503,7 @@ class ChallengesTagSort extends React.Component {
500
503
'Submission has been disabled as this challenge is hidden even for admins. This is to prevent challenge leakages.' ,
501
504
duration : 3
502
505
} ) ;
506
+ this . loadChallengeDetails ( this . state . currentChallenge , false )
503
507
}
504
508
else if ( data . error === "required-challenge-not-completed" ) {
505
509
notification [ "error" ] ( {
@@ -508,6 +512,7 @@ class ChallengesTagSort extends React.Component {
508
512
'It seems like you have not completed the required challenge before doing this challenge.' ,
509
513
duration : 3
510
514
} ) ;
515
+ this . loadChallengeDetails ( this . state . currentChallenge , false )
511
516
}
512
517
else if ( data . error === "required-challenge-not-found" ) {
513
518
notification [ "error" ] ( {
@@ -516,6 +521,7 @@ class ChallengesTagSort extends React.Component {
516
521
'This is likely an error in the challenge settings. Please contact an admin.' ,
517
522
duration : 3
518
523
} ) ;
524
+ this . loadChallengeDetails ( this . state . currentChallenge , false )
519
525
}
520
526
else if ( data . error === "submission-disabled" ) {
521
527
notification [ "error" ] ( {
@@ -524,6 +530,7 @@ class ChallengesTagSort extends React.Component {
524
530
'New flag submissions have been disabled. The competition might have ended/is not running.' ,
525
531
duration : 3
526
532
} ) ;
533
+ this . loadChallengeDetails ( this . state . currentChallenge , false )
527
534
}
528
535
else if ( data . error === "InvalidFlagLength" ) {
529
536
notification [ "error" ] ( {
@@ -532,6 +539,7 @@ class ChallengesTagSort extends React.Component {
532
539
'Please do not spam the server with submissions that are too long.' ,
533
540
duration : 3
534
541
} ) ;
542
+ this . loadChallengeDetails ( this . state . currentChallenge , false )
535
543
}
536
544
else {
537
545
console . log ( data . error )
0 commit comments