Skip to content

Commit 860a12a

Browse files
committed
move changes
1 parent c5fa3b1 commit 860a12a

File tree

8 files changed

+145
-52
lines changed

8 files changed

+145
-52
lines changed

apps/dashboard/redirects.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ const projectPageRedirects = [
105105
destination: projectRoute,
106106
permanent: false,
107107
},
108+
{
109+
source: `${projectRoute}/connect/analytics`,
110+
destination: `${projectRoute}`,
111+
permanent: false,
112+
},
108113
];
109114

110115
/** @type {import('next').NextConfig['redirects']} */

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { LinkIcon } from "lucide-react";
21
import Link from "next/link";
32

43
type FooterSectionProps = {
@@ -18,16 +17,16 @@ type FooterCardProps = {
1817
export function FooterLinksSection(props: FooterCardProps) {
1918
return (
2019
<div className="py-6">
21-
<div className="grid grid-cols-1 gap-6 xl:grid-cols-3 xl:gap-0 xl:divide-x xl:divide-border">
20+
<div className="grid grid-cols-1 gap-6 divide-dashed max-sm:divide-y xl:grid-cols-3 xl:gap-0 xl:divide-x xl:divide-border">
2221
<div className="xl:pr-6">
2322
<FooterSection {...props.left} />
2423
</div>
2524

26-
<div className="xl:px-6">
25+
<div className="max-sm:pt-4 xl:px-6">
2726
<FooterSection {...props.center} />
2827
</div>
2928

30-
<div className="xl:pl-6">
29+
<div className="max-sm:pt-4 xl:pl-6">
3130
<FooterSection {...props.right} />
3231
</div>
3332
</div>
@@ -38,7 +37,7 @@ export function FooterLinksSection(props: FooterCardProps) {
3837
function FooterSection(props: FooterSectionProps) {
3938
return (
4039
<div>
41-
<h3 className="mb-2.5 font-medium">{props.title}</h3>
40+
<h3 className="mb-2.5 font-semibold text-lg">{props.title}</h3>
4241
<div className="flex flex-col gap-2.5">
4342
{props.links.map((link) => (
4443
<FooterLink key={link.label} href={link.href} label={link.label} />
@@ -62,7 +61,6 @@ function FooterLink({
6261
rel="noopener noreferrer"
6362
className="flex items-start gap-2 text-balance text-muted-foreground text-sm hover:text-foreground"
6463
>
65-
<LinkIcon className="mt-1 size-3 shrink-0 opacity-70" />
6664
{label}
6765
</Link>
6866
);

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/universal-bridge/webhooks/components/webhooks.client.tsx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,6 @@ export function PayWebhooksPage(props: PayWebhooksPageProps) {
9292

9393
return (
9494
<div>
95-
<div className="flex items-center justify-between">
96-
<h2 className="font-semibold text-xl tracking-tight">Webhooks</h2>
97-
<CreateWebhookButton clientId={props.clientId} teamId={props.teamId}>
98-
<Button size="sm" variant="default" className="gap-1">
99-
<PlusIcon className="size-4" />
100-
<span>Create Webhook</span>
101-
</Button>
102-
</CreateWebhookButton>
103-
</div>
104-
105-
<div className="h-4" />
106-
10795
<TableContainer>
10896
<Table>
10997
<TableHeader>
@@ -142,6 +130,15 @@ export function PayWebhooksPage(props: PayWebhooksPageProps) {
142130
</TableBody>
143131
</Table>
144132
</TableContainer>
133+
134+
<div className="mt-4 flex justify-end">
135+
<CreateWebhookButton clientId={props.clientId} teamId={props.teamId}>
136+
<Button size="sm" variant="default" className="gap-1">
137+
<PlusIcon className="size-4" />
138+
<span>Create Webhook</span>
139+
</Button>
140+
</CreateWebhookButton>
141+
</div>
145142
</div>
146143
);
147144
}
Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getProject } from "@/api/projects";
2-
import { getTeamBySlug } from "@/api/team";
2+
import { UnderlineLink } from "@/components/ui/UnderlineLink";
33
import { redirect } from "next/navigation";
44
import { PayWebhooksPage } from "./components/webhooks.client";
55

@@ -10,14 +10,30 @@ export default async function Page(props: {
1010
}>;
1111
}) {
1212
const params = await props.params;
13-
const [project, team] = await Promise.all([
14-
getProject(params.team_slug, params.project_slug),
15-
getTeamBySlug(params.team_slug),
16-
]);
13+
const project = await getProject(params.team_slug, params.project_slug);
1714

18-
if (!project || !team) {
15+
if (!project) {
1916
redirect(`/team/${params.team_slug}`);
2017
}
2118

22-
return <PayWebhooksPage clientId={project.publishableKey} teamId={team.id} />;
19+
return (
20+
<div>
21+
<h2 className="mb-0.5 font-semibold text-xl tracking-tight">Webhooks</h2>
22+
<p className="text-muted-foreground text-sm">
23+
Get notified for Bridge, Swap and Onramp events.{" "}
24+
<UnderlineLink
25+
target="_blank"
26+
rel="noopener noreferrer"
27+
href="https://portal.thirdweb.com/pay/webhooks"
28+
>
29+
Learn more
30+
</UnderlineLink>
31+
</p>
32+
<div className="h-4" />
33+
<PayWebhooksPage
34+
clientId={project.publishableKey}
35+
teamId={project.teamId}
36+
/>
37+
</div>
38+
);
2339
}

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,16 +216,15 @@ export function ContractsWebhooksTable({
216216
}, [webhooks]);
217217

218218
return (
219-
<div className="w-full overflow-hidden rounded-lg border">
219+
<div className="w-full">
220220
<TWTable
221221
data={sortedWebhooks}
222222
columns={columns}
223223
isPending={false}
224224
isFetched={true}
225225
title="Webhooks"
226-
tableContainerClassName="border-none rounded-none"
227226
/>
228-
<div className="flex items-end justify-end gap-3 border-t bg-card px-6 py-4">
227+
<div className="mt-4 flex justify-end">
229228
<CreateContractWebhookButton
230229
projectClientId={projectClientId}
231230
supportedChainIds={supportedChainIds}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { TabPathLinks } from "@/components/ui/tabs";
2+
3+
export default async function WebhooksLayout(props: {
4+
children: React.ReactNode;
5+
params: Promise<{
6+
team_slug: string;
7+
project_slug: string;
8+
}>;
9+
}) {
10+
const params = await props.params;
11+
return (
12+
<div className="flex grow flex-col">
13+
<div className="pt-10 pb-4">
14+
<div className="container max-w-7xl">
15+
<h1 className="mb-1 font-semibold text-3xl tracking-tight">
16+
Webhooks
17+
</h1>
18+
<p className="text-base text-muted-foreground">
19+
Create and manage webhooks to get notified about events
20+
</p>
21+
</div>
22+
</div>
23+
24+
<TabPathLinks
25+
scrollableClassName="container max-w-7xl"
26+
links={[
27+
{
28+
name: "Contract",
29+
path: `/team/${params.team_slug}/${params.project_slug}/webhooks`,
30+
exactMatch: true,
31+
},
32+
{
33+
name: "Universal Bridge",
34+
path: `/team/${params.team_slug}/${params.project_slug}/webhooks/universal-bridge`,
35+
},
36+
]}
37+
/>
38+
<div className="h-6" />
39+
<div className="container flex max-w-7xl grow flex-col">
40+
{props.children}
41+
</div>
42+
<div className="h-10" />
43+
</div>
44+
);
45+
}

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

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,22 @@ export default async function WebhooksPage({
2222
}
2323

2424
return (
25-
<div className="flex grow flex-col">
26-
<div className="border-b py-10">
27-
<div className="container max-w-7xl">
28-
<h1 className="mb-1 font-semibold text-3xl tracking-tight">
29-
Webhooks
30-
</h1>
31-
<p className="text-muted-foreground text-sm">
32-
Create and manage webhooks to get notified about blockchain events,
33-
transactions and more.{" "}
34-
<UnderlineLink
35-
target="_blank"
36-
rel="noopener noreferrer"
37-
href="https://portal.thirdweb.com/insight/webhooks"
38-
>
39-
Learn more about webhooks.
40-
</UnderlineLink>
41-
</p>
42-
</div>
43-
</div>
44-
<div className="h-6" />
45-
<div className="container max-w-7xl">
46-
<ContractsWebhooksPageContent project={project} authToken={authToken} />
47-
</div>
48-
<div className="h-20" />
25+
<div>
26+
<h2 className="mb-0.5 font-semibold text-xl tracking-tight">
27+
Contract Webhooks
28+
</h2>
29+
<p className="text-muted-foreground text-sm">
30+
Get notified about blockchain events, transactions and more.{" "}
31+
<UnderlineLink
32+
target="_blank"
33+
rel="noopener noreferrer"
34+
href="https://portal.thirdweb.com/insight/webhooks"
35+
>
36+
Learn more
37+
</UnderlineLink>
38+
</p>
39+
<div className="h-4" />
40+
<ContractsWebhooksPageContent project={project} authToken={authToken} />
4941
</div>
5042
);
5143
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { getProject } from "@/api/projects";
2+
import { UnderlineLink } from "@/components/ui/UnderlineLink";
3+
import { redirect } from "next/navigation";
4+
import { PayWebhooksPage } from "../../universal-bridge/webhooks/components/webhooks.client";
5+
6+
export default async function Page(props: {
7+
params: Promise<{
8+
team_slug: string;
9+
project_slug: string;
10+
}>;
11+
}) {
12+
const params = await props.params;
13+
const project = await getProject(params.team_slug, params.project_slug);
14+
15+
if (!project) {
16+
redirect(`/team/${params.team_slug}`);
17+
}
18+
19+
return (
20+
<div>
21+
<h2 className="mb-0.5 font-semibold text-xl tracking-tight">
22+
Universal Bridge Webhooks
23+
</h2>
24+
<p className="text-muted-foreground text-sm">
25+
Get notified for Bridge, Swap and Onramp events.{" "}
26+
<UnderlineLink
27+
target="_blank"
28+
rel="noopener noreferrer"
29+
href="https://portal.thirdweb.com/pay/webhooks"
30+
>
31+
Learn more
32+
</UnderlineLink>
33+
</p>
34+
<div className="h-4" />
35+
<PayWebhooksPage
36+
clientId={project.publishableKey}
37+
teamId={project.teamId}
38+
/>
39+
</div>
40+
);
41+
}

0 commit comments

Comments
 (0)