-
Notifications
You must be signed in to change notification settings - Fork 1
Update project link #16
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -146,6 +146,13 @@ <h4>Contact</h4> | |
| a.textContent = startup.github_text; | ||
| infoDiv.appendChild(a); | ||
|
|
||
| const a2 = document.createElement('a'); | ||
| a2.href = startup.test_url; | ||
| a2.textContent = startup.test_text; | ||
| a2.className = 'secondary-link'; | ||
| infoDiv.appendChild(document.createElement('br')); | ||
| infoDiv.appendChild(a2); | ||
|
Comment on lines
+149
to
+154
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing null checks for secondary link properties
Tell me moreWhat is the issue?The code creates secondary links without checking if startup.test_url and startup.test_text exist, which will create broken links with undefined href and text when these properties are missing from the JSON data. Why this mattersThis will result in anchor elements with href="undefined" and textContent="undefined" being rendered on the page, creating a poor user experience and potentially broken functionality when users click on these malformed links. Suggested change ∙ Feature PreviewAdd conditional checks before creating the secondary link: if (startup.test_url && startup.test_text) {
const a2 = document.createElement('a');
a2.href = startup.test_url;
a2.textContent = startup.test_text;
a2.className = 'secondary-link';
infoDiv.appendChild(document.createElement('br'));
infoDiv.appendChild(a2);
}Provide feedback to improve future suggestions💬 Looking for more details? Reply to this comment to chat with Korbit. |
||
|
|
||
| card.appendChild(infoDiv); | ||
| container.appendChild(card); | ||
| }); | ||
|
|
||
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.
Unclear link hierarchy documentation
Tell me more
What is the issue?
The purpose of the secondary link and its relationship to the primary GitHub link is not documented.
Why this matters
The distinction between the two links and why one has a 'secondary-link' class is unclear, making it difficult to maintain consistent UI patterns.
Suggested change ∙ Feature Preview
// Create secondary action link (e.g., demo/test link)
const a2 = document.createElement('a');
a2.href = startup.test_url;
a2.textContent = startup.test_text;
a2.className = 'secondary-link';
Provide feedback to improve future suggestions
💬 Looking for more details? Reply to this comment to chat with Korbit.