Skip to content

bug: referral copy button can copy an empty link before invite link loads #133

@absalonCRC

Description

@absalonCRC

Summary

On the Invite Friends dashboard, the referral link starts as an empty string until /api/referrals/code returns. The Copy button is enabled during that loading window, so a quick click can copy an empty string and show the user a successful copy state even though no invite link was copied.

Steps to reproduce

  1. Open /dashboard/referrals on a slow connection or while /api/referrals/code is delayed.
  2. Click Copy before the referral link input is populated.

Expected

Copying should be disabled until the referral link is loaded, or the action should show a clear loading error instead of copying an empty string.

Actual

The Copy button can run with an empty referralLink value.

Proposed fix

Disable the Copy button while no referral link is loaded and guard the handler against empty-link copies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions