Skip to content

Commit 690be86

Browse files
MananTankjnsdls
authored andcommitted
move changes
1 parent 9f19558 commit 690be86

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
permanent: false,
106106
source: `${projectRoute}/nebula/:path*`,
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 href={link.href} key={link.label} label={link.label} />
@@ -56,7 +55,6 @@ function FooterLink({ href, label }: { href: string; label: string }) {
5655
rel="noopener noreferrer"
5756
target="_blank"
5857
>
59-
<LinkIcon className="mt-1 size-3 shrink-0 opacity-70" />
6058
{label}
6159
</Link>
6260
);

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 className="gap-1" size="sm" variant="default">
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 className="gap-1" size="sm" variant="default">
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,6 +1,6 @@
11
import { redirect } from "next/navigation";
22
import { getProject } from "@/api/projects";
3-
import { getTeamBySlug } from "@/api/team";
3+
import { UnderlineLink } from "@/components/ui/UnderlineLink";
44
import { PayWebhooksPage } from "./components/webhooks.client";
55

66
export default async function Page(props: {
@@ -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+
href="https://portal.thirdweb.com/pay/webhooks"
26+
rel="noopener noreferrer"
27+
target="_blank"
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
columns={columns}
222222
data={sortedWebhooks}
223223
isFetched={true}
224224
isPending={false}
225-
tableContainerClassName="border-none rounded-none"
226225
title="Webhooks"
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
client={client}
231230
projectClientId={projectClientId}
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+
links={[
26+
{
27+
exactMatch: true,
28+
name: "Contract",
29+
path: `/team/${params.team_slug}/${params.project_slug}/webhooks`,
30+
},
31+
{
32+
name: "Universal Bridge",
33+
path: `/team/${params.team_slug}/${params.project_slug}/webhooks/universal-bridge`,
34+
},
35+
]}
36+
scrollableClassName="container max-w-7xl"
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
@@ -24,30 +24,22 @@ export default async function WebhooksPage({
2424
}
2525

2626
return (
27-
<div className="flex grow flex-col">
28-
<div className="border-b py-10">
29-
<div className="container max-w-7xl">
30-
<h1 className="mb-1 font-semibold text-3xl tracking-tight">
31-
Webhooks
32-
</h1>
33-
<p className="text-muted-foreground text-sm">
34-
Create and manage webhooks to get notified about blockchain events,
35-
transactions and more.{" "}
36-
<UnderlineLink
37-
href="https://portal.thirdweb.com/insight/webhooks"
38-
rel="noopener noreferrer"
39-
target="_blank"
40-
>
41-
Learn more about webhooks.
42-
</UnderlineLink>
43-
</p>
44-
</div>
45-
</div>
46-
<div className="h-6" />
47-
<div className="container max-w-7xl">
48-
<ContractsWebhooksPageContent authToken={authToken} project={project} />
49-
</div>
50-
<div className="h-20" />
27+
<div>
28+
<h2 className="mb-0.5 font-semibold text-xl tracking-tight">
29+
Contract Webhooks
30+
</h2>
31+
<p className="text-muted-foreground text-sm">
32+
Get notified about blockchain events, transactions and more.{" "}
33+
<UnderlineLink
34+
href="https://portal.thirdweb.com/insight/webhooks"
35+
rel="noopener noreferrer"
36+
target="_blank"
37+
>
38+
Learn more
39+
</UnderlineLink>
40+
</p>
41+
<div className="h-4" />
42+
<ContractsWebhooksPageContent authToken={authToken} project={project} />
5143
</div>
5244
);
5345
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { redirect } from "next/navigation";
2+
import { getProject } from "@/api/projects";
3+
import { UnderlineLink } from "@/components/ui/UnderlineLink";
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+
href="https://portal.thirdweb.com/pay/webhooks"
28+
rel="noopener noreferrer"
29+
target="_blank"
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)