Skip to content

[UX] Show Claim Royalties button always with disabled state and tooltip #175

@realproject7

Description

@realproject7

Problem

The Claim Royalties button is completely hidden (return null) when unclaimed royalties are 0 or plot count < 2. Users have no idea this feature exists or what conditions unlock it.

Current behavior

ClaimRoyalties.tsx line 78:

if (unclaimed === BigInt(0) && txState === "idle") return null;

Component renders nothing — users never see it.

Expected behavior

  1. Always show the Claim Royalties section in the writer dashboard storyline card (below Earnings row)
  2. Disable the Claim button when conditions aren't met:
    • unclaimed === 0 → button disabled
    • plotCount < 2 → button disabled
  3. Add a tooltip/info icon (ⓘ) next to "Claim Royalties" heading that explains:
    • What royalties are: "You earn a percentage of every buy/sell trade on your storyline token"
    • When you can claim: "Requires at least 2 chained plots and non-zero unclaimed royalties"
    • Current status: e.g. "0/2 plots" or "2/2 plots, 0 WETH unclaimed"
  4. Show current unclaimed amount even when 0: Unclaimed: 0 WETH

Tooltip content

Royalties
You earn a share of every trade on your storyline's token.

To claim:
• Chain at least 2 plots (currently: {plotCount})
• Have unclaimed royalties > 0 (currently: {unclaimed} {RESERVE_LABEL})

Acceptance Criteria

  • Claim Royalties section always visible in writer dashboard (never return null)
  • Button disabled with reduced opacity when conditions not met
  • Info icon (ⓘ) with tooltip/popover explaining royalties and unlock conditions
  • Tooltip shows dynamic values (current plot count, unclaimed amount, token symbol)
  • Tooltip works on both hover (desktop) and tap (mobile)
  • When conditions ARE met, button is enabled and functions as before

Files

  • src/components/ClaimRoyalties.tsx — remove early return, add disabled state + tooltip
  • Possibly a shared Tooltip component if one doesn't exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions