Skip to content

feat(#323): stream gifting UI with gift message and shareable link - #348

Merged
Chuks-coderr merged 3 commits into
SoroStream:mainfrom
Vincent6581:feat/323-stream-gifting-ui
Jul 30, 2026
Merged

feat(#323): stream gifting UI with gift message and shareable link#348
Chuks-coderr merged 3 commits into
SoroStream:mainfrom
Vincent6581:feat/323-stream-gifting-ui

Conversation

@Vincent6581

Copy link
Copy Markdown
Contributor

Summary

Closes #323

Adds a dedicated stream gifting UI — a modal that lets users create a pre-paid stream as a gift for another user, complete with an optional personal message and a shareable link to share with the recipient.

Changes

New component: components/GiftStreamModal.tsx

Three-step flow:

Step 1 (form)

  • Recipient address input with Stellar address validation
  • Token selector (USDC, XLM, AQUA, yXLM)
  • Total amount field
  • Unlock duration: preset buttons (7d, 30d, 90d, 1y) plus custom day input
  • Optional gift message textarea (280-char limit)
  • Validates that recipient != sender

Step 2 (confirming)

  • Spinner while sorostream.createStream() resolves

Step 3 (done)

  • Success screen with the new stream ID
  • Shareable gift link (/stream/{streamId}) with Copy button
  • Link to view the stream directly

Gift messages are persisted in localStorage under sorostream-gift-messages keyed by stream ID, using exported helpers getGiftMessage() / saveGiftMessage().

Modified: src/app/dashboard/page.tsx

  • Import GiftStreamModal and add showGiftModal state
  • Add a "Gift a Stream" button (purple, with gift emoji) to the dashboard header alongside the New Stream button
  • Render <GiftStreamModal> when showGiftModal is true

Modified: src/app/stream/[id]/page.tsx

  • Import getGiftMessage from GiftStreamModal
  • Add giftMessage state, loaded on mount from localStorage
  • Render a prominent purple banner ("You received a gift stream!") with the message when giftMessage is set

Acceptance Criteria

  • Gift creation form accessible from the dashboard (Gift a Stream button in header)
  • Gift message stored in localStorage keyed by stream ID
  • Shareable gift link generated on confirmation
  • Gift message visible on the recipient stream detail page (purple banner)
  • Form validates that recipient is not the sender

…reable link

- Add GiftStreamModal component with a 3-step flow (form → confirming → done):
  - Step 1 (form): collects recipient address, token, total amount, unlock
    duration (preset buttons + custom days input), and optional gift message
  - Validates recipient is a valid Stellar address and not the same as sender
  - Step 2: spinner while createStream() resolves
  - Step 3: success screen with shareable gift link and Copy button
- Gift message persisted in localStorage keyed by stream ID (sorostream-gift-messages)
  via getGiftMessage() / saveGiftMessage() helpers exported from GiftStreamModal
- Add 'Gift a Stream' 🎁 button to dashboard header (purple, next to New Stream)
- GiftStreamModal rendered from dashboard with focus-trapped dialog
- Stream detail page reads gift message from localStorage and shows a prominent
  purple banner (🎁 'You received a gift stream!') when a message is present
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

@Vincent6581 is attempting to deploy a commit to the Chuks7 Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@Vincent6581 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Chuks-coderr
Chuks-coderr merged commit 4eb3909 into SoroStream:main Jul 30, 2026
2 of 5 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.

Add stream gifting UI to send a pre-paid stream as a gift to another user

2 participants