-
Notifications
You must be signed in to change notification settings - Fork 559
Feature: Add image support to payment links #7129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe changes update the Changes
Sequence Diagram(s)sequenceDiagram
participant UI as PayPageEmbed Component
participant API as getPaymentLink Function
participant Data as PaymentLink Data Source
UI->>API: Request PaymentLink by ID
API->>Data: Fetch payment link data
Data-->>API: Return { title, imageUrl, ... }
API-->>UI: Return PaymentLink object with title and imageUrl
UI->>UI: Render PayPageEmbed with title and image
Possibly related PRs
Suggested labels
Suggested reviewers
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7129 +/- ##
=======================================
Coverage 55.61% 55.61%
=======================================
Files 902 902
Lines 58177 58177
Branches 4085 4085
=======================================
Hits 32356 32356
Misses 25716 25716
Partials 105 105
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
apps/dashboard/src/@/api/universal-bridge/links.ts (1)
40-41
: Mapping update is consistent with type changes.The property mapping in the return object correctly reflects the type changes, using
data.title
and addingdata.imageUrl
. This ensures the returned object structure matches the updated PaymentLink type.However, consider adding validation for the imageUrl to ensure it's a valid URL format before returning it:
return { clientId: data.clientId, title: data.title, - imageUrl: data.imageUrl, + imageUrl: data.imageUrl && typeof data.imageUrl === 'string' ? data.imageUrl : undefined, receiver: data.receiver, destinationToken: data.destinationToken, amount: data.amount ? BigInt(data.amount) : undefined, purchaseData: data.purchaseData, } as PaymentLink;apps/dashboard/src/app/pay/[id]/page.tsx (1)
65-66
: Component props updated to support image display.The changes properly align with the updates to the PaymentLink type:
- Using
paymentLink.title
instead of the previouslabel
property- Adding the new
image
prop withpaymentLink.imageUrl
This ensures the PayPageEmbed component receives the necessary data to display both the title and image of the payment link.
You might want to add optional chaining or a fallback for the image prop to handle cases where imageUrl is undefined:
- image={paymentLink.imageUrl} + image={paymentLink.imageUrl || undefined}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
apps/dashboard/src/@/api/universal-bridge/links.ts
(2 hunks)apps/dashboard/src/app/pay/[id]/page.tsx
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: E2E Tests (pnpm, esbuild)
- GitHub Check: E2E Tests (pnpm, webpack)
- GitHub Check: E2E Tests (pnpm, vite)
- GitHub Check: Size
- GitHub Check: Lint Packages
- GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/dashboard/src/@/api/universal-bridge/links.ts (1)
8-9
: Successful implementation of type updates for image support.The PaymentLink type has been properly updated with the renamed property (
title
instead oflabel
) and the newimageUrl
property. Both are correctly marked as optional with the?
operator.
size-limit report 📦
|
🤖 Generated with Claude Code
PR-Codex overview
This PR focuses on updating the
PaymentLink
structure in the application to enhance the attributes it holds, specifically renaming and adding properties to improve clarity and functionality.Detailed summary
In
apps/dashboard/src/app/pay/[id]/page.tsx
:paymentLink.label
topaymentLink.title
.paymentLink.imageUrl
to the component.In
apps/dashboard/src/@/api/universal-bridge/links.ts
:label
totitle
.imageUrl
to thePaymentLink
type.title
andimageUrl
properties.Summary by CodeRabbit
New Features
Refactor