Skip to content

feat: add Copy Community ID button on profile page - #65

Open
ashudhanda wants to merge 1 commit into
BetterDevOrg:mainfrom
ashudhanda:feat/copy-community-id
Open

feat: add Copy Community ID button on profile page#65
ashudhanda wants to merge 1 commit into
BetterDevOrg:mainfrom
ashudhanda:feat/copy-community-id

Conversation

@ashudhanda

Copy link
Copy Markdown

What changed

  • Added a copy icon button next to the Community ID on /profile
  • Copies member.communityId to the clipboard using the same pattern as the invite link copy
  • Shows check icon + colored feedback on success (text-emerald-400) and error (text-brand-pink), auto-resets after 2s
  • Added role="status" with aria-live="polite" (screen-reader-only) announcing "Community ID copied to clipboard" / "Could not copy Community ID"
  • Button has aria-label and title of "Copy Community ID"
  • Only src/app/profile/page.tsx changed

How to test

  1. npm run dev, sign in, open /profile
  2. Click the copy icon next to Community ID — paste elsewhere, value matches DEV-XXXX
  3. Confirm the check icon / color feedback appears and resets after ~2s
  4. Works at mobile width (icon sits inline with the ID, no layout shift)
  5. npm run build passes

Closes #62

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.

[Good first issue]: Add Copy Community ID button on profile page

1 participant