Skip to content

Extract OPAL branding helpers into shared module#40

Merged
ghostleek merged 2 commits intofix/show-profilefrom
copilot/sub-pr-38-again
Mar 4, 2026
Merged

Extract OPAL branding helpers into shared module#40
ghostleek merged 2 commits intofix/show-profilefrom
copilot/sub-pr-38-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 3, 2026

OPAL_CANONICAL_LOGO and normalizeOpalLogo were copy-pasted across three API routes, creating drift risk.

Changes

  • src/lib/branding.ts (new) — single source of truth for the constant and helper:
    export const OPAL_CANONICAL_LOGO = '/icons/opal2.png';
    
    export function normalizeOpalLogo<T extends { slug: string | null; logoUrl: string | null }>(app: T): T {
      if (app.slug === 'opal') return { ...app, logoUrl: OPAL_CANONICAL_LOGO };
      return app;
    }
  • api/apps.ts — removed local definition, imports normalizeOpalLogo from branding.ts
  • api/profile/manage.ts — same
  • api/profile/[slug].ts — removed local constant, imports OPAL_CANONICAL_LOGO from branding.ts

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 3, 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 3, 2026 3:27pm

…randing.ts

Co-authored-by: ghostleek <44336310+ghostleek@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Profile management UI and Opal logo based on feedback Extract OPAL branding helpers into shared module Mar 3, 2026
@ghostleek ghostleek marked this pull request as ready for review March 4, 2026 14:27
@ghostleek ghostleek merged commit 57422b6 into fix/show-profile Mar 4, 2026
3 checks passed
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