-
Notifications
You must be signed in to change notification settings - Fork 21
Feat/v6 #1283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| <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 */ |
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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') |
There was a problem hiding this comment.
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.
Fix up some remaining OR / -v6 links and add in the ability to redirect to URL submissions for TG.