Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

exclude ACME_PROGRAM_ID from ConnectPayoutReminder

Steven Tey5168468fe084
diff --git a/apps/web/app/(ee)/api/cron/payouts/reminders/partners/route.ts b/apps/web/app/(ee)/api/cron/payouts/reminders/partners/route.ts
index c5b94fbd62..c363632741 100644
--- a/apps/web/app/(ee)/api/cron/payouts/reminders/partners/route.ts
+++ b/apps/web/app/(ee)/api/cron/payouts/reminders/partners/route.ts
@@ -3,7 +3,7 @@ import { verifyVercelSignature } from "@/lib/cron/verify-vercel";
import { sendBatchEmail } from "@dub/email";
import ConnectPayoutReminder from "@dub/email/templates/connect-payout-reminder";
import { prisma } from "@dub/prisma";
-import { chunk } from "@dub/utils";
+import { ACME_PROGRAM_ID, chunk } from "@dub/utils";
import { NextResponse } from "next/server";
export const dynamic = "force-dynamic";
@@ -20,6 +20,9 @@ export async function GET(req: Request) {
by: ["partnerId", "programId"],
where: {
status: "pending",
+ programId: {
+ not: ACME_PROGRAM_ID,
+ },
partner: {
payoutsEnabledAt: null,
OR: [
diff --git a/apps/web/ui/analytics/feedback/action.ts b/apps/web/ui/analytics/feedback/action.ts
deleted file mode 100644
index 6064da2b48..0000000000
--- a/apps/web/ui/analytics/feedback/action.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-"use server";
-
-import { sendEmail } from "@dub/email";
-import FeedbackEmail from "@dub/email/templates/feedback-email";
-
-export async function submitFeedback(data: FormData) {
- const email = data.get("email") as string;
- const feedback = data.get("feedback") as string;
-
- return await sendEmail({
- ...(email && { replyTo: email }),
- subject: "🎉 New Feedback Received!",
- react: FeedbackEmail({ email, feedback }),
- });
-}
diff --git a/apps/web/ui/analytics/feedback/index.tsx b/apps/web/ui/analytics/feedback/index.tsx
deleted file mode 100644
index b4631855b3..0000000000
--- a/apps/web/ui/analytics/feedback/index.tsx
+++ /dev/null
@@ -1,82 +0,0 @@
-"use client";
-
-import { Button } from "@dub/ui";
-import { CheckCircle } from "lucide-react";
-import { AnimatePresence, motion } from "motion/react";
-import { useState } from "react";
-import { useFormStatus } from "react-dom";
-import { submitFeedback } from "./action";
-
-export default function Feedback() {
- const [submitted, setSubmitted] = useState(false);
-
- return (
- <div className="scrollbar-hide relative z-0 h-[400px] overflow-scroll border border-neutral-200 bg-white px-7 py-5 sm:rounded-lg sm:border-neutral-100 sm:shadow-lg">
- <div className="mb-5 flex">
- <h1 className="text-xl font-semibold">Feedback</h1>
- </div>
- <AnimatePresence>
- {submitted ? (
- <motion.div
- className="flex h-[280px] flex-col items-center justify-center space-y-3"
- initial={{ opacity: 0, y: 10 }}
- animate={{ opacity: 1, y: 0 }}
- >
- <CheckCircle className="h-8 w-8 text-green-500" />
- <p className="text-neutral-500">Thank you for your feedback!</p>
- </motion.div>
- ) : (
- <motion.form
- action={(data) =>
- submitFeedback(data).then(() => {
- setSubmitted(true);
- })
- }
- className="grid gap-5"
- initial={{ opacity: 1, y: 0 }}
- exit={{ opacity: 0, y: -10 }}
- >
- <div>
- <label
- htmlFor="email"
- className="mb-2 block text-xs font-medium text-neutral-500"
- >
- EMAIL
- </label>
- <input
- name="email"
- type="email"
- placeholder="[email protected]"
- autoComplete="email"
- className="block w-full rounded-md border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm"
- />
- </div>
- <div>
- <label
- htmlFor="feedback"
- className="mb-2 block text-xs font-medium text-neutral-500"
- >
- FEEDBACK
- </label>
- <textarea
- name="feedback"
- id="feedback"
- required={true}
- rows={6}
- className="block w-full rounded-md border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm"
- placeholder="What other data would you like to see?"
- aria-invalid="true"
- />
- </div>
- <FormButton />
- </motion.form>
- )}
- </AnimatePresence>
- </div>
- );
-}
-
-const FormButton = () => {
- const { pending } = useFormStatus();
- return <Button text="Submit feedback" loading={pending} />;
-};
diff --git a/apps/web/ui/analytics/index.tsx b/apps/web/ui/analytics/index.tsx
index 6e38507192..26810632a1 100644
--- a/apps/web/ui/analytics/index.tsx
+++ b/apps/web/ui/analytics/index.tsx
@@ -68,7 +68,6 @@ function StatsGrid() {
<Referer />
<Locations />
<Devices />
- {/* <Feedback /> */}
</div>
);
}