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.

small fixes

Steven Teyee7d693e8d24
diff --git a/apps/web/app/(ee)/api/stripe/webhook/customer-subscription-deleted.ts b/apps/web/app/(ee)/api/stripe/webhook/customer-subscription-deleted.ts
index 57455533a0..a1694521c5 100644
--- a/apps/web/app/(ee)/api/stripe/webhook/customer-subscription-deleted.ts
+++ b/apps/web/app/(ee)/api/stripe/webhook/customer-subscription-deleted.ts
@@ -6,7 +6,7 @@ import { stripe } from "@/lib/stripe";
import { recordLink } from "@/lib/tinybird";
import { webhookCache } from "@/lib/webhook/cache";
import { prisma } from "@dub/prisma";
-import { FREE_PLAN, getPlanFromPriceId, log } from "@dub/utils";
+import { capitalize, FREE_PLAN, getPlanFromPriceId, log } from "@dub/utils";
import { NextResponse } from "next/server";
import Stripe from "stripe";
import { sendCancellationFeedback } from "./utils/send-cancellation-feedback";
@@ -182,7 +182,9 @@ export async function customerSubscriptionDeleted(event: Stripe.Event) {
message:
":cry: Workspace *`" +
workspace.slug +
- "`* deleted their subscription" +
+ "`* deleted their *`" +
+ capitalize(workspace.plan) +
+ "`* subscription" +
(isBlacklistedCancellation ? " (blacklisted / banned)" : ""),
type: "cron",
mention: true,
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/members/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/members/page-client.tsx
index 6808dc4e2e..d1eae03910 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/members/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/members/page-client.tsx
@@ -39,7 +39,7 @@ import { Command } from "cmdk";
import { UserMinus } from "lucide-react";
import { useSession } from "next-auth/react";
import { useSearchParams } from "next/navigation";
-import { useMemo, useState } from "react";
+import { useEffect, useMemo, useState } from "react";
import useSWR from "swr";
export default function WorkspacePeopleClient() {
@@ -303,6 +303,10 @@ function RoleCell({
}) {
const [role, setRole] = useState<PartnerRole>(user.role);
+ useEffect(() => {
+ setRole(user.role);
+ }, [user.role]);
+
const { WorkspaceUserRoleModal, setShowWorkspaceUserRoleModal } =
useWorkspaceUserRoleModal({
user: {
diff --git a/apps/web/ui/layout/sidebar/partners-sidebar-nav.tsx b/apps/web/ui/layout/sidebar/partners-sidebar-nav.tsx
index b4556bbde0..35ca8ffc8d 100644
--- a/apps/web/ui/layout/sidebar/partners-sidebar-nav.tsx
+++ b/apps/web/ui/layout/sidebar/partners-sidebar-nav.tsx
@@ -8,7 +8,6 @@ import { useRouterStuff } from "@dub/ui";
import {
Bell,
CircleDollar,
- CircleInfo,
ColorPalette2,
Gauge6,
Gear2,
@@ -226,25 +225,6 @@ const NAV_AREAS: SidebarNavAreas<SidebarNavData> = {
],
}),
- // Partner settings
- partnerSettings: () => ({
- title: "Settings",
- direction: "left",
- content: [
- {
- name: "Account",
- items: [
- {
- name: "Notifications",
- icon: CircleInfo,
- href: "/settings/notifications",
- exact: true,
- },
- ],
- },
- ],
- }),
-
// User settings
userSettings: () => ({
title: "Settings",
@@ -264,11 +244,6 @@ const NAV_AREAS: SidebarNavAreas<SidebarNavData> = {
icon: ShieldCheck,
href: "/account/settings/security",
},
- {
- name: "Notifications",
- icon: Bell,
- href: "/account/settings/notifications",
- },
],
},
],
@@ -296,15 +271,13 @@ export function PartnersSidebarNav({
const currentArea = useMemo(() => {
return pathname.startsWith("/account/settings")
? "userSettings"
- : pathname.startsWith("/settings")
- ? "partnerSettings"
- : pathname.startsWith("/profile")
- ? "profile"
- : ["/payouts", "/messages"].some((p) => pathname.startsWith(p))
- ? null
- : isEnrolledProgramPage
- ? "program"
- : "programs";
+ : pathname.startsWith("/profile")
+ ? "profile"
+ : ["/payouts", "/messages"].some((p) => pathname.startsWith(p))
+ ? null
+ : isEnrolledProgramPage
+ ? "program"
+ : "programs";
}, [pathname, programSlug, isEnrolledProgramPage]);
const { count: invitationsCount } = useProgramEnrollmentsCount({
diff --git a/apps/web/ui/modals/invite-partner-user-modal.tsx b/apps/web/ui/modals/invite-partner-user-modal.tsx
index 68e7dfb3a3..d3e1da36d3 100644
--- a/apps/web/ui/modals/invite-partner-user-modal.tsx
+++ b/apps/web/ui/modals/invite-partner-user-modal.tsx
@@ -86,7 +86,7 @@ function InvitePartnerUserModal({
<p className="text-sm text-neutral-500">
Invite members to join your{" "}
<span className="font-semibold text-black">{partner?.name}</span>{" "}
- partner team . Invitations will be valid for 14 days.
+ partner team. Invitations will be valid for 14 days.
</p>
</div>