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.

some cleanup

Kiran K7bb6cb7f1f5f
diff --git a/apps/web/app/(ee)/api/groups/route.ts b/apps/web/app/(ee)/api/groups/route.ts
index 81d3cc03ce..441ccebc79 100644
--- a/apps/web/app/(ee)/api/groups/route.ts
+++ b/apps/web/app/(ee)/api/groups/route.ts
@@ -113,11 +113,9 @@ export const POST = withWorkspace(
partnerGroupDefaultLinks,
} = defaultGroup;
- const groupId = createId({ prefix: "grp_" });
-
return await tx.partnerGroup.create({
data: {
- id: groupId,
+ id: createId({ prefix: "grp_" }),
programId,
name,
slug,
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/links/group-additional-links.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/links/group-additional-links.tsx
index 0a1b94452d..ce7a2080ae 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/links/group-additional-links.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/links/group-additional-links.tsx
@@ -245,7 +245,7 @@ function DestinationUrl({ link }: { link: PartnerGroupAdditionalLink }) {
};
const { setShowConfirmModal, confirmModal } = useConfirmModal({
- title: "Delete Destination URL",
+ title: "Delete destination URL",
description: `Are you sure you want to delete "${getPrettyUrl(link.url)}"? This action cannot be undone.`,
confirmText: "Delete",
onConfirm: deleteDestinationUrl,
diff --git a/apps/web/lib/api/groups/utils.ts b/apps/web/lib/api/groups/utils.ts
deleted file mode 100644
index 5178b57288..0000000000
--- a/apps/web/lib/api/groups/utils.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { PartnerGroupDefaultLink } from "@/lib/types";
-
-// Identifies new default links added to a group
-export function findNewDefaultPartnerLink(
- oldLinks: PartnerGroupDefaultLink[] | null,
- newLinks: PartnerGroupDefaultLink[],
-): PartnerGroupDefaultLink | null {
- return (
- newLinks.find(
- (newLink) => !oldLinks?.some((old) => old.url === newLink.url),
- ) || null
- );
-}