Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export default function Submission(props) {
const onOpenRatingsList = onOpenRatingsListModal.bind(1, submissionObject.id);
const onOpenReviewApp = () => {
if (!challenge || !challenge.id) return;
const url = `${config.REVIEW_APP_URL}/active-challenges/${challenge.id}/challenge-details?tab=submission`;
const tab = submissionObject.type === 'CHECKPOINT_SUBMISSION' || submissionObject.type === 'CONTEST_SUBMISSION'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ maintainability]
Consider using a constant or enum for submission types like 'CHECKPOINT_SUBMISSION' and 'CONTEST_SUBMISSION' to avoid magic strings and improve maintainability.

? 'checkpoint-submission'
: 'submission';
const url = `${config.REVIEW_APP_URL}/active-challenges/${challenge.id}/challenge-details?tab=${tab}`;
window.open(url, '_blank', 'noopener,noreferrer');
};

Expand Down
Loading