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.

Format

Kiran K018328cc98f4
diff --git a/apps/web/app/(ee)/api/stripe/integration/webhook/account-application-deauthorized.ts b/apps/web/app/(ee)/api/stripe/integration/webhook/account-application-deauthorized.ts
index 1edff813b1..899b3b2cc5 100644
--- a/apps/web/app/(ee)/api/stripe/integration/webhook/account-application-deauthorized.ts
+++ b/apps/web/app/(ee)/api/stripe/integration/webhook/account-application-deauthorized.ts
@@ -3,23 +3,14 @@ import { STRIPE_INTEGRATION_ID } from "@dub/utils";
import Stripe from "stripe";
import { WebhookHandlerInput, WebhookHandlerResponse } from "./types";
-// Handle event "account.application.deauthorized"
-// export async function accountApplicationDeauthorized({
-// mode,
-// workspace,
-// }: StripeWebhookInput): Promise<StripeWebhookOutput> {
-// if (mode === "test") {
-// return {
-// response: `Stripe Connect account ${workspace.stripeConnectId} deauthorized in test mode. Skipping...`,
-// import type Stripe from "stripe";
-// import { WebhookHandlerInput, WebhookHandlerResponse } from "./types";
-
// Handle event "account.application.deauthorized"
export async function accountApplicationDeauthorized({
- event,
mode,
workspace,
-}: WebhookHandlerInput<Stripe.AccountApplicationDeauthorizedEvent>): Promise<WebhookHandlerResponse> {
+}: Omit<
+ WebhookHandlerInput<Stripe.AccountApplicationDeauthorizedEvent>,
+ "event"
+>): Promise<WebhookHandlerResponse> {
const stripeAccountId = workspace.stripeConnectId!;
if (mode === "test") {
diff --git a/apps/web/app/(ee)/api/stripe/integration/webhook/route.ts b/apps/web/app/(ee)/api/stripe/integration/webhook/route.ts
index 26cf74ccf6..3af1905584 100644
--- a/apps/web/app/(ee)/api/stripe/integration/webhook/route.ts
+++ b/apps/web/app/(ee)/api/stripe/integration/webhook/route.ts
@@ -126,7 +126,6 @@ export const POST = withAxiom(async (req: Request) => {
switch (event.type) {
case "account.application.deauthorized":
result = await accountApplicationDeauthorized({
- event,
mode,
workspace,
});
diff --git a/apps/web/app/(ee)/api/stripe/integration/webhook/utils/types.ts b/apps/web/app/(ee)/api/stripe/integration/webhook/utils/types.ts
deleted file mode 100644
index 4aaa092601..0000000000
--- a/apps/web/app/(ee)/api/stripe/integration/webhook/utils/types.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { StripeMode } from "@/lib/types";
-import { Project } from "@prisma/client";
-
-export type StripeWebhookInput = {
- mode: StripeMode;
- workspace: Pick<
- Project,
- | "id"
- | "stripeConnectId"
- | "defaultProgramId"
- | "webhookEnabled"
- | "stagingWorkspaceId"
- >;
-};
-
-export type StripeWebhookOutput = {
- response: string;
-};
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/bounty-criteria.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/bounty-criteria.tsx
index df8f7babe6..b3f41e70bd 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/bounty-criteria.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/bounty-criteria.tsx
@@ -18,11 +18,8 @@ import { BountyLogic } from "./bounty-logic";
export function BountyCriteria() {
const { watch } = useBountyFormContext();
- const [
- bountyTypeUI = "performance",
- rewardAmount,
- rewardType = "flat",
- ] = watch(["bountyTypeUI", "rewardAmount", "rewardType"]);
+ const [bountyTypeUI = "performance", rewardAmount, rewardType = "flat"] =
+ watch(["bountyTypeUI", "rewardAmount", "rewardType"]);
const showPerformanceContent = bountyTypeUI === "performance";
const showSubmissionContent = bountyTypeUI === "submission";
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/use-add-edit-bounty-form.ts b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/use-add-edit-bounty-form.ts
index 013e8ecc8f..3b181d4159 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/use-add-edit-bounty-form.ts
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/use-add-edit-bounty-form.ts
@@ -20,10 +20,7 @@ import { BountySubmissionFrequency } from "@prisma/client";
import { Dispatch, SetStateAction, useEffect, useMemo, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
-import {
- BountyTypeUI,
- CreateBountyInputExtended,
-} from "./bounty-form-context";
+import { BountyTypeUI, CreateBountyInputExtended } from "./bounty-form-context";
import { useConfirmCreateBountyModal } from "./confirm-create-bounty-modal";
const ACCORDION_ITEMS = [
@@ -459,7 +456,8 @@ export function useAddEditBountyForm({
if (!parsed.success) {
return (
- parsed.error.issues[0]?.message ?? "Invalid social metrics criteria."
+ parsed.error.issues[0]?.message ??
+ "Invalid social metrics criteria."
);
}
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/settings/group-move-rules.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/settings/group-move-rules.tsx
index 22c95b6b0f..a5fbffb2ea 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/settings/group-move-rules.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/settings/group-move-rules.tsx
@@ -4,8 +4,8 @@ import { getPlanCapabilities } from "@/lib/plan-capabilities";
import useGroup from "@/lib/swr/use-group";
import useWorkspace from "@/lib/swr/use-workspace";
import { WorkflowCondition } from "@/lib/types";
-import { GroupColorCircle } from "@/ui/partners/groups/group-color-circle";
import { useAdvancedUpsellModal } from "@/ui/partners/advanced-upsell-modal";
+import { GroupColorCircle } from "@/ui/partners/groups/group-color-circle";
import {
InlineBadgePopover,
InlineBadgePopoverAmountInput,
diff --git a/apps/web/lib/sandbox/components/workspace-environment.tsx b/apps/web/lib/sandbox/components/workspace-environment.tsx
index 691f287ee8..978681670d 100644
--- a/apps/web/lib/sandbox/components/workspace-environment.tsx
+++ b/apps/web/lib/sandbox/components/workspace-environment.tsx
@@ -10,10 +10,7 @@ import { WorkspaceEnvironment } from "@prisma/client";
import { motion } from "motion/react";
import Link from "next/link";
import { usePathname } from "next/navigation";
-import {
- isProductionEnvironment,
- isStagingEnvironment,
-} from "../environment";
+import { isProductionEnvironment, isStagingEnvironment } from "../environment";
const buttonClassName =
"text-content-emphasis flex w-full items-center justify-center gap-x-2 rounded-lg border border-neutral-200 px-2 py-1 outline-none transition-all duration-75 hover:bg-neutral-100/50 focus-visible:ring-2 focus-visible:ring-black/50 active:bg-neutral-200/80";