Skip to content

Refactor: use centralised normalizeOpalLogo in api/profile/[slug].ts#46

Draft
Copilot wants to merge 2 commits intofix/show-profilefrom
copilot/sub-pr-45
Draft

Refactor: use centralised normalizeOpalLogo in api/profile/[slug].ts#46
Copilot wants to merge 2 commits intofix/show-profilefrom
copilot/sub-pr-45

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 4, 2026

api/profile/[slug].ts duplicated the Opal logo normalisation inline while a centralised normalizeOpalLogo helper already existed in src/lib/branding.ts (used by api/apps.ts and api/profile/manage.ts).

Changes

  • api/profile/[slug].ts: swap import from OPAL_CANONICAL_LOGOnormalizeOpalLogo; wrap the pinned-app object with normalizeOpalLogo(...) instead of the inline ternary
// before
logoUrl: item.appSlug === 'opal' ? OPAL_CANONICAL_LOGO : item.appLogoUrl,

// after
return normalizeOpalLogo({
  ...
  slug: item.appSlug,
  logoUrl: item.appLogoUrl,
  ...
});

No behaviour change — purely removes the duplicated normalisation rule.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 4, 2026

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

Project Deployment Actions Updated (UTC)
string-v2 Ready Ready Preview, Comment Mar 4, 2026 2:55pm

…go in [slug].ts

Co-authored-by: ghostleek <44336310+ghostleek@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP to address feedback on Fix/show profile PR Refactor: use centralised normalizeOpalLogo in api/profile/[slug].ts Mar 4, 2026
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