Skip to content

Wire the Copy link button on the creator profile to the clipboard #980

Description

@nanaf6203-bit

Summary
The creator profile page (src/app/u/[username]/page.tsx) renders a "Copy link" button with no onClick handler, so clicking it does nothing, and creators cannot share their tip link from the profile as intended. The page is currently a server component, so the button must be extracted into a small client component (or the page converted) to attach interactivity.

Proposal
Give the button an onClick that writes the profile URL (for example, ${window.location.origin}/u/${username}) to the clipboard via navigator.clipboard.writeText.
Show feedback on success and failure using the existing toast provider (useToast in src/components/ui/toast/ToastProvider.tsx).
Handle the clipboard API being unavailable (for example, an insecure context) gracefully.
Extract the button into a client component so the server-rendered page can remain server-side.
Acceptance criteria

Clicking "Copy link" copies the profile URL to the clipboard.

The user sees success or failure feedback via a toast.

The button fails gracefully when the clipboard API is unavailable.

npm run typecheck passes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions