File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ class SubmissionManagementPageContainer extends React.Component {
65
65
showModal,
66
66
toBeDeletedId,
67
67
} = this . props ;
68
- const isRegistered = registrants . find ( r => _ . toString ( r . handle ) === _ . toString ( handle ) ) ;
68
+ const isRegistered = registrants . find ( r => _ . toString ( r . memberHandle ) === _ . toString ( handle ) ) ;
69
69
if ( ! isRegistered ) return < AccessDenied redirectLink = { `${ challengesUrl } /${ challenge . id } ` } cause = { ACCESS_DENIED_REASON . HAVE_NOT_SUBMITTED_TO_THE_CHALLENGE } /> ;
70
70
71
71
const isEmpty = _ . isEmpty ( challenge ) ;
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class SubmissionsPageContainer extends React.Component {
53
53
54
54
render ( ) {
55
55
const { registrants, handle, challengeId } = this . props ;
56
- const isRegistered = registrants . find ( r => _ . toString ( r . handle ) === _ . toString ( handle ) ) ;
56
+ const isRegistered = registrants . find ( r => _ . toString ( r . memberHandle ) === _ . toString ( handle ) ) ;
57
57
if ( ! isRegistered ) {
58
58
return (
59
59
< React . Fragment >
Original file line number Diff line number Diff line change @@ -112,11 +112,8 @@ function getOgImage(challenge, challengeTypes) {
112
112
}
113
113
}
114
114
115
- function isRegistered ( details , registrants , handle ) {
116
- if ( details && details . roles && details . roles . includes ( 'Submitter' ) ) {
117
- return true ;
118
- }
119
- if ( _ . find ( registrants , r => _ . toString ( r . handle ) === _ . toString ( handle ) ) ) {
115
+ function isRegistered ( registrants , handle ) {
116
+ if ( _ . find ( registrants , r => _ . toString ( r . memberHandle ) === _ . toString ( handle ) ) ) {
120
117
return true ;
121
118
}
122
119
return false ;
@@ -398,7 +395,6 @@ class ChallengeDetailPageContainer extends React.Component {
398
395
const isLegacyMM = isMM ( challenge ) && Boolean ( challenge . roundId ) ;
399
396
400
397
const hasRegistered = isRegistered (
401
- challenge . userDetails ,
402
398
challenge . registrants ,
403
399
( auth . user || { } ) . handle ,
404
400
) ;
You can’t perform that action at this time.
0 commit comments