Skip to content

Commit

Permalink
Merge branch 'main' into deprecate-post-customers
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tey authored Jan 18, 2025
2 parents 3d9d44c + 5a6d116 commit 9331d2f
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export async function checkoutSessionCompleted(event: Stripe.Event) {
aiLimit: plan.limits.ai!,
tagsLimit: plan.limits.tags!,
usersLimit: plan.limits.users!,
salesLimit: plan.limits.sales!,
},
select: {
users: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export async function customerSubscriptionDeleted(event: Stripe.Event) {
aiLimit: FREE_PLAN.limits.ai!,
tagsLimit: FREE_PLAN.limits.tags!,
usersLimit: FREE_PLAN.limits.users!,
salesLimit: FREE_PLAN.limits.sales!,
paymentFailedAt: null,
},
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export async function customerSubscriptionUpdated(event: Stripe.Event) {
aiLimit: plan.limits.ai!,
tagsLimit: plan.limits.tags!,
usersLimit: plan.limits.users!,
salesLimit: plan.limits.sales!,
paymentFailedAt: null,
},
}),
Expand Down
6 changes: 3 additions & 3 deletions apps/web/app/banned/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const metadata = constructMetadata({
export default async function BannedPage() {
return (
<main className="flex min-h-screen flex-col justify-between">
<NavMobile />
<Nav />
<NavMobile staticDomain="dub.sh" />
<Nav staticDomain="dub.sh" />
<div className="z-10 mx-2 my-10 flex max-w-md flex-col items-center space-y-5 px-2.5 text-center sm:mx-auto sm:max-w-lg sm:px-0 lg:mb-16">
<div className="mx-auto flex h-20 w-20 items-center justify-center rounded-full border border-gray-300 bg-white/30">
<ShieldBan className="size-6 text-gray-500" />
Expand All @@ -30,7 +30,7 @@ export default async function BannedPage() {
Create Your Free Branded Link
</a>
</div>
<Footer />
<Footer staticDomain="dub.sh" />
<Background />
</main>
);
Expand Down
3 changes: 3 additions & 0 deletions apps/web/lib/integrations/segment/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const transformClickEvent = (data: ClickEventWebhookData) => {
context: {
ip: click.ip,
integration,
library: integration,
...buildCampaignContext(link),
},
properties: {
Expand All @@ -57,6 +58,7 @@ const transformLeadEvent = (data: LeadEventWebhookData) => {
context: {
ip: click.ip,
integration,
library: integration,
...buildCampaignContext(link),
},
properties: {
Expand All @@ -76,6 +78,7 @@ const transformSaleEvent = (data: SaleEventWebhookData) => {
context: {
ip: click.ip,
integration,
library: integration,
...buildCampaignContext(link),
},
properties: {
Expand Down
18 changes: 18 additions & 0 deletions apps/web/scripts/update-sales-limits.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { prisma } from "@dub/prisma";
import "dotenv-flow/config";

async function main() {
const workspaces = await prisma.project.updateMany({
where: {
plan: "business",
salesLimit: 0,
},
data: {
salesLimit: 5000_00,
},
});

console.table(workspaces);
}

main();
4 changes: 3 additions & 1 deletion apps/web/ui/auth/register/verify-email-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export const VerifyEmailForm = () => {
if (response?.ok) {
router.push("/onboarding");
} else {
toast.error("Failed to redirect to dashboard.");
toast.error(
"Failed to sign in with credentials. Please try again or contact support.",
);
}
},
onError({ error }) {
Expand Down
3 changes: 3 additions & 0 deletions packages/utils/src/constants/pricing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export const PLANS = [
limits: {
links: 25,
clicks: 1000,
sales: 0,
domains: 3,
tags: 5,
users: 1,
Expand Down Expand Up @@ -194,6 +195,7 @@ export const PLANS = [
limits: {
links: 1000,
clicks: 50000,
sales: 0,
domains: 10,
tags: 25,
users: 5,
Expand Down Expand Up @@ -333,6 +335,7 @@ export const PLANS = [
limits: {
links: 250000,
clicks: 5000000,
sales: 1000000_00,
domains: 1000,
tags: 1000,
users: 500,
Expand Down

0 comments on commit 9331d2f

Please sign in to comment.