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 updates

Steven Teyad52bd2cc324
diff --git a/apps/web/app/admin.dub.co/(dashboard)/components/user-info.tsx b/apps/web/app/admin.dub.co/(dashboard)/components/user-info.tsx
index f8a96c4bf3..7ba654e22d 100644
--- a/apps/web/app/admin.dub.co/(dashboard)/components/user-info.tsx
+++ b/apps/web/app/admin.dub.co/(dashboard)/components/user-info.tsx
@@ -1,6 +1,6 @@
"use client";
import { Badge, Copy, Tick, useCopyToClipboard } from "@dub/ui";
-import { capitalize, nFormatter } from "@dub/utils";
+import { capitalize, currencyFormatter, nFormatter } from "@dub/utils";
import { toast } from "sonner";
export interface UserInfoProps {
@@ -74,7 +74,7 @@ export default function UserInfo({ data }: { data: UserInfoProps }) {
<div className="flex justify-between text-sm">
<span className="font-medium text-neutral-700">Sales</span>
<span className="text-neutral-500">
- {nFormatter(workspace.sales, { full: true })}
+ {currencyFormatter(workspace.sales / 100)}
</span>
</div>
</div>
diff --git a/apps/web/ui/layout/sidebar/usage.tsx b/apps/web/ui/layout/sidebar/usage.tsx
index fe08a5633f..14dca4eda5 100644
--- a/apps/web/ui/layout/sidebar/usage.tsx
+++ b/apps/web/ui/layout/sidebar/usage.tsx
@@ -116,9 +116,7 @@ function UsageInner() {
usage={salesUsage}
limit={salesLimit}
showNextPlan={hovered}
- // nextPlanLimit={nextPlan?.limits.sales}
- // TODO: Update this once we update the plan limits
- nextPlanLimit={50000}
+ nextPlanLimit={nextPlan?.limits.sales}
warning={warnings[2]}
/>
) : null}
@@ -265,7 +263,10 @@ const UsageRow = forwardRef<HTMLDivElement, UsageRowProps>(
}}
>
<motion.span className="ml-1 whitespace-nowrap text-xs font-medium text-blue-600">
- {formatNumber(nextPlanLimit)}
+ {label === "Sales" ? "$" : ""}
+ {formatNumber(
+ label === "Sales" ? nextPlanLimit / 100 : nextPlanLimit,
+ )}
</motion.span>
</motion.div>
)}