Skip to content

Commit 7399f60

Browse files
committed
fixup! refactor: move /universal-bridge to /payments
1 parent 036409c commit 7399f60

File tree

14 files changed

+66
-48
lines changed

14 files changed

+66
-48
lines changed

apps/dashboard/src/@/analytics/report.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,3 +413,10 @@ export function reportUpsellShown(properties: UpsellParams) {
413413
export function reportUpsellClicked(properties: UpsellParams) {
414414
posthog.capture("upsell clicked", properties);
415415
}
416+
417+
// ----------------------------
418+
// PAYMENTS
419+
// ----------------------------
420+
export function reportPaymentCardClick(properties: { id: string }) {
421+
posthog.capture("payment card clicked", properties);
422+
}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectFTUX/ProjectFTUX.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ function ProductsSection(props: { teamSlug: string; projectSlug: string }) {
254254
{
255255
description:
256256
"Bridge, swap, and purchase cryptocurrencies with any fiat options or tokens via cross-chain routing",
257-
href: `/team/${props.teamSlug}/${props.projectSlug}/universal-bridge`,
257+
href: `/team/${props.teamSlug}/${props.projectSlug}/payments`,
258258
icon: PayIcon,
259259
title: "Payments",
260260
},

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectSidebarLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function ProjectSidebarLayout(props: {
7979
group: "Monetize",
8080
links: [
8181
{
82-
href: `${layoutPath}/universal-bridge`,
82+
href: `${layoutPath}/payments`,
8383
icon: PayIcon,
8484
label: "Payments",
8585
},

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/insight/components/TopChainsTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
TableHeader,
1414
TableRow,
1515
} from "@/components/ui/table";
16-
import { CardHeading } from "../../universal-bridge/components/common";
16+
import { CardHeading } from "../../payments/components/common";
1717

1818
export function TopInsightChainsTable(props: {
1919
data: InsightChainStats[];

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/insight/components/TopEndpointsTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
TableHeader,
1414
TableRow,
1515
} from "@/components/ui/table";
16-
import { CardHeading } from "../../universal-bridge/components/common";
16+
import { CardHeading } from "../../payments/components/common";
1717

1818
export function TopInsightEndpointsTable(props: {
1919
data: InsightEndpointStats[];

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ function AppHighlightsCard({
423423
emptyContent: (
424424
<EmptyStateContent
425425
description="Your app hasn't collected any fees yet."
426-
link={`/team/${params.team_slug}/${params.project_slug}/connect/universal-bridge/settings`}
426+
link={`/team/${params.team_slug}/${params.project_slug}/payments/settings`}
427427
metric="Fees"
428428
/>
429429
),

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/analytics/page.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ export default async function Page(props: {
2424
const project = await getProject(params.team_slug, params.project_slug);
2525

2626
if (!authToken) {
27-
loginRedirect(
28-
`/team/${params.team_slug}/${params.project_slug}/universal-bridge`,
29-
);
27+
loginRedirect(`/team/${params.team_slug}/${params.project_slug}/payments`);
3028
}
3129

3230
if (!project) {
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
"use client";
2+
3+
import Link from "next/link";
4+
import { reportPaymentCardClick } from "@/analytics/report";
5+
import { Button } from "@/components/ui/button";
6+
import { Card } from "@/components/ui/card";
7+
8+
export function FeatureCard(props: {
9+
title: string;
10+
description: string;
11+
icon: React.ReactNode;
12+
id: string;
13+
link: { href: string; label: string; target?: string };
14+
}) {
15+
return (
16+
<Card className="p-4 flex flex-col items-start gap-4">
17+
<div className="text-muted-foreground rounded-full border bg-background size-12 flex items-center justify-center">
18+
{props.icon}
19+
</div>
20+
<div className="flex flex-col gap-0.5">
21+
<h3 className="font-semibold">{props.title}</h3>
22+
<p className="text-muted-foreground text-sm">{props.description}</p>
23+
</div>
24+
<Button
25+
onClick={() => reportPaymentCardClick({ id: props.id })}
26+
size="sm"
27+
variant="default"
28+
className="h-8"
29+
asChild
30+
>
31+
<Link href={props.link.href} target={props.link.target}>
32+
{props.link.label}
33+
</Link>
34+
</Button>
35+
</Card>
36+
);
37+
}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/page.tsx

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ import {
77
HammerIcon,
88
LinkIcon,
99
} from "lucide-react";
10-
import Link from "next/link";
1110
import { redirect } from "next/navigation";
1211
import { ResponsiveSearchParamsProvider } from "responsive-rsc";
1312
import { getAuthToken } from "@/api/auth-token";
1413
import { getProject } from "@/api/projects";
15-
import { Button } from "@/components/ui/button";
16-
import { Card } from "@/components/ui/card";
1714
import { loginRedirect } from "@/utils/redirects";
15+
import { FeatureCard } from "./components/FeatureCard.client";
1816

1917
export default async function Page(props: {
2018
params: Promise<{
@@ -32,9 +30,7 @@ export default async function Page(props: {
3230
const project = await getProject(params.team_slug, params.project_slug);
3331

3432
if (!authToken) {
35-
loginRedirect(
36-
`/team/${params.team_slug}/${params.project_slug}/universal-bridge`,
37-
);
33+
loginRedirect(`/team/${params.team_slug}/${params.project_slug}/payments`);
3834
}
3935

4036
if (!project) {
@@ -51,6 +47,7 @@ export default async function Page(props: {
5147
title="Earn Fees"
5248
description="Setup fees to earn any time a user swaps or bridges funds."
5349
icon={<BadgeDollarSignIcon className="size-5" />}
50+
id="earn_fees"
5451
link={{
5552
href: `/team/${params.team_slug}/${params.project_slug}/payments/settings`,
5653
label: "Configure",
@@ -60,6 +57,7 @@ export default async function Page(props: {
6057
title="Create Payment Links"
6158
description="Create shareable URLs to receive any token in seconds."
6259
icon={<LinkIcon className="size-5" />}
60+
id="create_payment_links"
6361
link={{
6462
href: `/pay`,
6563
label: "Create",
@@ -69,6 +67,7 @@ export default async function Page(props: {
6967
title="Sell Your Token"
7068
description="Allow users to swap from any token to your token from your app."
7169
icon={<ArrowLeftRightIcon className="size-5" />}
70+
id="sell_your_token"
7271
link={{
7372
href: `/team/${params.team_slug}/${params.project_slug}/tokens`,
7473
label: "Launch Token",
@@ -78,6 +77,7 @@ export default async function Page(props: {
7877
title="Get Notified"
7978
description="Create Webhooks to get notified on each purchase or transaction."
8079
icon={<BellDotIcon className="size-5" />}
80+
id="get_notified"
8181
link={{
8282
href: `/team/${params.team_slug}/${params.project_slug}/payments/webhooks`,
8383
label: "Setup",
@@ -87,6 +87,7 @@ export default async function Page(props: {
8787
title="Sell Products"
8888
description="Sell physical or digital products with an easy-to-configure component."
8989
icon={<CoinsIcon className="size-5" />}
90+
id="sell_products"
9091
link={{
9192
href: "https://portal.thirdweb.com/payments/products",
9293
label: "Get Started",
@@ -97,6 +98,7 @@ export default async function Page(props: {
9798
title="Customize Your Experience"
9899
description="Fully customizable backend API to create your own branded flows."
99100
icon={<HammerIcon className="size-5" />}
101+
id="customize_your_experience"
100102
link={{
101103
href: "https://payments.thirdweb.com/reference",
102104
label: "Docs",
@@ -130,27 +132,3 @@ export default async function Page(props: {
130132
</ResponsiveSearchParamsProvider>
131133
);
132134
}
133-
134-
function FeatureCard(props: {
135-
title: string;
136-
description: string;
137-
icon: React.ReactNode;
138-
link: { href: string; label: string; target?: string };
139-
}) {
140-
return (
141-
<Card className="p-4 flex flex-col items-start gap-4">
142-
<div className="text-muted-foreground rounded-full border bg-background size-12 flex items-center justify-center">
143-
{props.icon}
144-
</div>
145-
<div className="flex flex-col gap-0.5">
146-
<h3 className="font-semibold">{props.title}</h3>
147-
<p className="text-muted-foreground text-sm">{props.description}</p>
148-
</div>
149-
<Button size="sm" variant="default" className="h-8" asChild>
150-
<Link href={props.link.href} target={props.link.target}>
151-
{props.link.label}
152-
</Link>
153-
</Button>
154-
</Card>
155-
);
156-
}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/payments/settings/page.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { PayConfig } from "@app/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/PayConfig";
2-
import { RouteDiscovery } from "@app/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/settings/RouteDiscovery";
1+
import { PayConfig } from "@app/team/[team_slug]/[project_slug]/(sidebar)/payments/settings/PayConfig";
2+
import { RouteDiscovery } from "@app/team/[team_slug]/[project_slug]/(sidebar)/payments/settings/RouteDiscovery";
33
import { redirect } from "next/navigation";
44
import { getAuthToken } from "@/api/auth-token";
55
import { getProject } from "@/api/projects";
@@ -23,9 +23,7 @@ export default async function Page(props: {
2323
]);
2424

2525
if (!authToken) {
26-
loginRedirect(
27-
`/team/${team_slug}/${project_slug}/universal-bridge/settings`,
28-
);
26+
loginRedirect(`/team/${team_slug}/${project_slug}/payments/settings`);
2927
}
3028

3129
if (!team) {

0 commit comments

Comments
 (0)