-
-
Notifications
You must be signed in to change notification settings - Fork 886
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
fix: enable conditional rendering of social media links in Ambassadors Page #3861
base: master
Are you sure you want to change the base?
fix: enable conditional rendering of social media links in Ambassadors Page #3861
Conversation
WalkthroughThis pull request updates the rendering logic in the Ambassador Index page. The component now conditionally renders social media links for Twitter, GitHub, and LinkedIn based on the existence of corresponding URLs, avoiding the display of empty links. Additionally, the ambassador biography section has been removed, streamlining the page layout. There are no changes to exported or public entities. Changes
Sequence Diagram(s)sequenceDiagram
participant I as Index Component
participant A as Ambassador Data
participant R as Rendered Output
I->>A: Load ambassador data
A-->>I: Provide social URLs (twitterUrl, githubUrl, linkedinUrl)
I->>R: If twitterUrl exists, render Twitter link
I->>R: If githubUrl exists, render GitHub link
I->>R: If linkedinUrl exists, render LinkedIn link
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 180000ms (3)
🔇 Additional comments (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
❌ Deploy Preview for asyncapi-website failed.Built without sensitive environment variables
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3861 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 667 667
Branches 113 113
=========================================
Hits 667 667 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
This PR adds conditional rendering to prevent displaying undefined social links on the Ambassadors page. Previously, if an ambassador's social link (Twitter, GitHub, or LinkedIn) was missing, an empty tag was still rendered, which could lead to unnecessary spacing and accessibility issues.
Changes Implemented:
✅ Added conditional checks to ensure that only defined social links are displayed.
✅ Updated the JSX structure to prevent rendering empty links.
Before & After:
Before:
Empty links were rendered even if a social link was missing.
After:
Only available social links are displayed, improving UI consistency.
How to Test:
Run the project locally.
Navigate to the Ambassadors page.
Check if only the available social links (Twitter, GitHub, LinkedIn) are displayed.
Screenshot:

Checklist:
Code follows the project's contributing guidelines.
UI behaves as expected.
No console errors or warnings
Let me know if you need any modifications!** 🚀
Summary by CodeRabbit