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.

remove remaining stuff

Steven Teyc86d76cfa5ec
diff --git a/apps/web/app/api/cron/usage/utils.ts b/apps/web/app/api/cron/usage/utils.ts
index e9fa5bd0c7..3d0d092d0c 100644
--- a/apps/web/app/api/cron/usage/utils.ts
+++ b/apps/web/app/api/cron/usage/utils.ts
@@ -75,7 +75,7 @@ export const updateUsage = async () => {
const { plan, usage, usageLimit } = workspace;
/*
- We only reset clicks usage if it's not over clicksLimit by:
+ We only reset clicks usage if it's not over usageLimit by:
- 4x for free plan (4K clicks)
- 2x for all other plans
*/
diff --git a/apps/web/app/api/stripe/connect/webhook/customer-created.ts b/apps/web/app/api/stripe/connect/webhook/customer-created.ts
index 6d795b9649..844759c32e 100644
--- a/apps/web/app/api/stripe/connect/webhook/customer-created.ts
+++ b/apps/web/app/api/stripe/connect/webhook/customer-created.ts
@@ -57,7 +57,7 @@ export async function customerCreated(event: Stripe.Event) {
.omit({ timestamp: true })
.parse(clickEvent.data[0]);
- const [link] = await Promise.all([
+ await Promise.all([
// update link leads count
prisma.link.update({
where: {
@@ -88,18 +88,5 @@ export async function customerCreated(event: Stripe.Event) {
}),
]);
- if (link.domain === "refer.dub.co") {
- await prisma.project.update({
- where: {
- slug: link.key,
- },
- data: {
- referredSignups: {
- increment: 1,
- },
- },
- });
- }
-
return `Customer created: ${customer.id}`;
}
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx
index 82059b093d..06382c0be4 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx
@@ -20,8 +20,6 @@ export default function WorkspaceBillingClient() {
const router = useRouter();
const searchParams = useSearchParams();
- const workspace = useWorkspace();
-
const {
id,
plan,
@@ -39,7 +37,7 @@ export default function WorkspaceBillingClient() {
usersLimit,
billingCycleStart,
conversionEnabled,
- } = workspace;
+ } = useWorkspace();
const { tags } = useTags();
const { users } = useUsers();