Skip to content

Commit a8d74ce

Browse files
committed
Dashboard: Add redirects for project pages
1 parent 0798f45 commit a8d74ce

File tree

1 file changed

+41
-9
lines changed

1 file changed

+41
-9
lines changed

apps/dashboard/redirects.js

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,46 @@ const legacyDashboardToTeamRedirects = [
6262
},
6363
];
6464

65+
const projectRoute = "/team/:team_slug/:project_slug";
66+
67+
const projectPageRedirects = [
68+
{
69+
source: `${projectRoute}/connect/pay/:path*`,
70+
destination: `${projectRoute}/universal-bridge/:path*`,
71+
permanent: false,
72+
},
73+
{
74+
source: `${projectRoute}/connect/universal-bridge/:path*`,
75+
destination: `${projectRoute}/universal-bridge/:path*`,
76+
permanent: false,
77+
},
78+
{
79+
source: `${projectRoute}/connect/account-abstraction/:path*`,
80+
destination: `${projectRoute}/account-abstraction/:path*`,
81+
permanent: false,
82+
},
83+
{
84+
source: `${projectRoute}/connect/in-app-wallets/:path*`,
85+
destination: `${projectRoute}/wallets/:path*`,
86+
permanent: false,
87+
},
88+
{
89+
source: `${projectRoute}/engine/cloud/vault/:path*`,
90+
destination: `${projectRoute}/vault/:path*`,
91+
permanent: false,
92+
},
93+
{
94+
source: `${projectRoute}/assets/:path*`,
95+
destination: `${projectRoute}/tokens/:path*`,
96+
permanent: false,
97+
},
98+
{
99+
source: `${projectRoute}/nebula/:path*`,
100+
destination: projectRoute,
101+
permanent: false,
102+
},
103+
];
104+
65105
/** @type {import('next').NextConfig['redirects']} */
66106
async function redirects() {
67107
return [
@@ -326,14 +366,6 @@ async function redirects() {
326366
destination: "/",
327367
permanent: false,
328368
},
329-
// pay > universal-bridge redirect
330-
{
331-
source: "/team/:team_slug/:project_slug/connect/pay/:path*",
332-
destination:
333-
"/team/:team_slug/:project_slug/connect/universal-bridge/:path*",
334-
permanent: false,
335-
},
336-
337369
// all /learn/tutorials (and sub-routes) -> /learn/guides
338370
{
339371
source: "/learn/tutorials/:path*",
@@ -382,8 +414,8 @@ async function redirects() {
382414
destination: "/transactions",
383415
permanent: false,
384416
},
385-
386417
...legacyDashboardToTeamRedirects,
418+
...projectPageRedirects,
387419
];
388420
}
389421

0 commit comments

Comments
 (0)