Skip to content

Conversation

@jmgasper
Copy link
Collaborator

Fix up some remaining OR / -v6 links and add in the ability to redirect to URL submissions for TG.

@jmgasper jmgasper requested a review from kkartunov as a code owner October 31, 2025 10:33
<a
href={
`${EnvironmentConfig.ADMIN.ONLINE_REVIEW_URL}/actions/ViewProjectDetails?pid=${props.challenge.legacyId}` /* eslint-disable-line max-len */
`${EnvironmentConfig.ADMIN.REVIEW_UI_URL}/=${props.challenge.id}` /* eslint-disable-line max-len */

Choose a reason for hiding this comment

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

[❗❗ correctness]
The URL structure seems incorrect. The = character after REVIEW_UI_URL appears misplaced and might lead to an invalid URL. Ensure the URL is constructed correctly to avoid broken links.

})
return map
}, [props.submissions])
const handleSubmissionDownload = useCallback((submissionId: string) => {

Choose a reason for hiding this comment

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

[⚠️ performance]
The useCallback dependency array includes submissionsById, which is derived from props.submissions. Ensure that props.submissions is stable or memoized to prevent unnecessary recalculations of handleSubmissionDownload.

const targetUrl = submission.url?.trim()
if (targetUrl) {
if (typeof window !== 'undefined') {
const openedWindow = window.open(targetUrl, '_blank', 'noopener,noreferrer')

Choose a reason for hiding this comment

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

[⚠️ security]
When opening a new window with window.open, consider checking if targetUrl is a valid URL to prevent potential issues with malformed URLs.

@jmgasper jmgasper merged commit acfc2b4 into dev Oct 31, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants