The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update create-payout-sheet.tsx
Kiran K7885ba8bc0bb
diff --git a/apps/web/ui/partners/create-payout-sheet.tsx b/apps/web/ui/partners/create-payout-sheet.tsxindex 2481d1b32d..cf66c24663 100644--- a/apps/web/ui/partners/create-payout-sheet.tsx+++ b/apps/web/ui/partners/create-payout-sheet.tsx@@ -149,7 +149,7 @@ function CreatePayoutSheetContent(props: CreatePayoutSheetProps) {});const onSubmit = async (data: FormData) => {- if (!workspaceId || !program || !partnerId || !amount) {+ if (!workspaceId || !program || !partnerId) {toast.error("Please fill all required fields");return;}@@ -167,9 +167,10 @@ function CreatePayoutSheetContent(props: CreatePayoutSheetProps) {programId: program.id,start: startDate ? new Date(startDate).toISOString() : undefined,end: endDate ? new Date(endDate).toISOString() : undefined,- ...(payoutType != "sales" && {- amount: amount * 100,- }),+ ...(payoutType != "sales" &&+ amount && {+ amount: amount * 100,+ }),partnerId,});};