Skip to content

feat(site): add reusable social links component - #1018

Open
BaoT1301 wants to merge 2 commits into
mainfrom
feat/786-socials-link-component
Open

feat(site): add reusable social links component#1018
BaoT1301 wants to merge 2 commits into
mainfrom
feat/786-socials-link-component

Conversation

@BaoT1301

Copy link
Copy Markdown
Contributor

Description

Fixes #786

The marketing footer and the go/creators footer each hardcoded their own copy of Todd's social profile URLs, labels, and icons. That duplication meant a profile change (or a new platform) had to be made in two places and could drift, which it already had: the two footers listed different platform sets, and the go footer's Discord URL carried a trailing space.

What changed

  • New SocialLinks component under components/common/social-links, with a single SOCIAL_LINKS source of truth for every profile (href, aria-label, icon).
  • It renders accessible external icon links that open in a new tab with rel="noopener noreferrer", and accepts optional platforms (which set and in what order) and iconSize props so each surface controls its own presentation without duplicating the data.
  • Both footers now render <SocialLinks /> instead of their own arrays.

Kept identical on purpose

  • Each footer keeps its existing platform set and order (marketing: Instagram, LinkedIn, X, YouTube; go: X, Instagram, LinkedIn, YouTube, Discord), so the visible icons are unchanged. I did not silently add Discord to the marketing footer. If we'd prefer the two footers to show the same set, that's now a one-line change, happy to do it if you want.

Only behavior change

  • The marketing footer's social links now open in a new tab (target="_blank" + rel="noopener noreferrer"), matching what the go footer already did. Previously they opened in the same tab via the locale-aware Link, which is meant for internal routes, not external URLs.

Tests / stories

  • Unit tests: default render, platform subset and order, and new-tab safety.
  • Storybook story with an all-platforms variant plus per-footer variants.

Checklist

  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • Any components that you've modified are accessible.
  • You've used conventional commits where appropriate

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
internal-dashboard Ready Ready Preview, Comment Jul 17, 2026 12:09am
nightcrawler Ready Ready Preview, Comment Jul 17, 2026 12:09am

The marketing footer and the go/creators footer each hardcoded their own
copy of Todd's social profile URLs, labels, and icons. That duplication
meant a profile change (or a new platform) had to be made in two places
and could drift, which it already had: the two footers listed different
platform sets and the Discord URL carried a trailing space.

Adds a shared `SocialLinks` component under `components/common` with a
single `SOCIAL_LINKS` source of truth for every profile (href, aria
label, icon). It renders accessible external icon links that open in a
new tab with `rel="noopener noreferrer"`, and takes optional `platforms`
(which set and order) and `iconSize` props so each surface controls its
own presentation without duplicating the data.

Both footers now render `<SocialLinks />` instead of their own arrays.
Each keeps its existing platform set and order (marketing: Instagram,
LinkedIn, X, YouTube; go: X, Instagram, LinkedIn, YouTube, Discord), so
the visible icons are unchanged. The only behavior change is that the
marketing footer's social links now open in a new tab, matching the go
footer.

Includes unit tests (default render, platform subset and order, new-tab
safety) and a Storybook story with all-platforms and per-footer variants.
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.

Create socials link component

1 participant