Skip to content

Commit 807e877

Browse files
committed
WIP - Remove legacy dashboard
1 parent 9f9410a commit 807e877

File tree

473 files changed

+2542
-5098
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

473 files changed

+2542
-5098
lines changed

apps/dashboard/redirects.js

Lines changed: 69 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,69 @@
1+
const legacyDashboardToTeamRedirects = [
2+
{
3+
source: "/dashboard",
4+
destination: "/team",
5+
permanent: false,
6+
},
7+
{
8+
source: "/dashboard/contracts/:path*",
9+
destination: "/team/~/~/contracts",
10+
permanent: false,
11+
},
12+
{
13+
source: "/dashboard/connect/ecosystem/:path*",
14+
destination: "/team/~/~/ecosystem/:path*",
15+
permanent: false,
16+
},
17+
{
18+
source: "/dashboard/engine/:path*",
19+
destination: "/team/~/~/engine/:path*",
20+
permanent: false,
21+
},
22+
{
23+
source: "/dashboard/settings/api-keys",
24+
destination: "/team/~/~/projects",
25+
permanent: false,
26+
},
27+
{
28+
source: "/dashboard/settings/devices",
29+
destination: "/account/devices",
30+
permanent: false,
31+
},
32+
{
33+
source: "/dashboard/settings/billing",
34+
destination: "/team/~/~/settings/billing",
35+
permanent: false,
36+
},
37+
{
38+
source: "/dashboard/settings/gas-credits",
39+
destination: "/team/~/~/settings/credits",
40+
permanent: false,
41+
},
42+
{
43+
source: "/dashboard/settings/usage",
44+
destination: "/team/~/~/usage",
45+
permanent: false,
46+
},
47+
{
48+
source: "/dashboard/settings/storage",
49+
destination: "/team/~/~/usage/storage",
50+
permanent: false,
51+
},
52+
{
53+
source: "/dashboard/settings/notifications",
54+
destination: "/team/~/~/settings/notifications",
55+
permanent: false,
56+
},
57+
// rest of the /dashboard/* routes
58+
{
59+
source: "/dashboard/:path*",
60+
destination: "/team",
61+
permanent: false,
62+
},
63+
];
64+
165
/** @type {import('next').NextConfig['redirects']} */
2-
function redirects() {
66+
async function redirects() {
367
return [
468
{
569
source: "/portal/:match*",
@@ -11,16 +75,6 @@ function redirects() {
1175
destination: "/solutions/chains",
1276
permanent: true,
1377
},
14-
{
15-
source: "/dashboard/publish/:path*",
16-
destination: "/contracts/publish/:path*",
17-
permanent: false,
18-
},
19-
{
20-
source: "/dashboard/mumbai/publish/:path*",
21-
destination: "/contracts/publish/:path*",
22-
permanent: false,
23-
},
2478
{
2579
source: "/contracts/release",
2680
destination: "/contracts/publish",
@@ -97,103 +151,28 @@ function redirects() {
97151
destination: "/polygon-zkevm",
98152
permanent: false,
99153
},
100-
{
101-
source: "/settings",
102-
destination: "/dashboard/settings/api-keys",
103-
permanent: false,
104-
},
105-
// backwards compat: page moved to pages/settings/api-key
106-
{
107-
source: "/dashboard/api-keys",
108-
destination: "/dashboard/settings/api-keys",
109-
permanent: false,
110-
},
111154
// backwards compat: page moved to pages/settings/devices
112-
{
113-
source: "/dashboard/settings/account",
114-
destination: "/dashboard/settings/devices",
115-
permanent: false,
116-
},
155+
117156
{
118157
source: "/template/nft-drop",
119158
destination: "/template/erc721",
120159
permanent: false,
121160
},
122161
{
123162
source: "/create-api-key",
124-
destination: "/dashboard/settings/api-keys",
163+
destination: "/team/~/~/projects",
125164
permanent: false,
126165
},
127166
{
128167
source: "/dashboard/settings",
129-
destination: "/dashboard/settings/api-keys",
130-
permanent: false,
131-
},
132-
{
133-
source: "/dashboard/connect",
134-
destination: "/dashboard/connect/analytics",
168+
destination: "/team/~/~/projects",
135169
permanent: false,
136170
},
137171
{
138172
source: "/dashboard/connect/playground",
139173
destination: "https://playground.thirdweb.com/connect/sign-in/button",
140174
permanent: false,
141175
},
142-
{
143-
source: "/dashboard/wallet",
144-
destination: "https://playground.thirdweb.com/connect/sign-in/button",
145-
permanent: false,
146-
},
147-
{
148-
source: "/dashboard/rpc",
149-
destination: "/dashboard/infrastructure/rpc-edge",
150-
permanent: false,
151-
},
152-
{
153-
source: "/dashboard/storage",
154-
destination: "/dashboard/infrastructure/storage",
155-
permanent: false,
156-
},
157-
{
158-
source: "/smart-wallet",
159-
destination: "/account-abstraction",
160-
permanent: false,
161-
},
162-
{
163-
source: "/dashboard/published",
164-
destination: "/dashboard/publish",
165-
permanent: false,
166-
},
167-
{
168-
source: "/dashboard/wallets",
169-
destination: "https://playground.thirdweb.com/connect/sign-in/button",
170-
permanent: false,
171-
},
172-
{
173-
source: "/dashboard/wallets/analytics",
174-
destination: "/dashboard/connect/analytics",
175-
permanent: false,
176-
},
177-
{
178-
source: "/dashboard/wallets/embedded",
179-
destination: "/dashboard/connect/embedded-wallets",
180-
permanent: false,
181-
},
182-
{
183-
source: "/dashboard/wallets/smart-wallet",
184-
destination: "/dashboard/connect/account-abstraction",
185-
permanent: false,
186-
},
187-
{
188-
source: "/dashboard/wallets/connect",
189-
destination: "https://playground.thirdweb.com/connect/sign-in/button",
190-
permanent: false,
191-
},
192-
{
193-
source: "/dashboard/infrastructure",
194-
destination: "/dashboard/settings/storage",
195-
permanent: false,
196-
},
197176
{
198177
source: "/dashboard/infrastructure/storage",
199178
destination: "/dashboard/settings/storage",
@@ -204,26 +183,6 @@ function redirects() {
204183
destination: "/chainlist",
205184
permanent: false,
206185
},
207-
{
208-
source: "/dashboard/contracts",
209-
destination: "/dashboard/contracts/deploy",
210-
permanent: false,
211-
},
212-
{
213-
source: "/solidity-sdk",
214-
destination: "/build",
215-
permanent: false,
216-
},
217-
{
218-
source: "/connect-wallet",
219-
destination: "/connect",
220-
permanent: false,
221-
},
222-
{
223-
source: "/wallet-sdk",
224-
destination: "https://portal.thirdweb.com/wallet-sdk/latest",
225-
permanent: false,
226-
},
227186
{
228187
source: "/solutions/commerce",
229188
destination: "/solutions/loyalty",
@@ -244,27 +203,12 @@ function redirects() {
244203
destination: "/optimism",
245204
permanent: false,
246205
},
247-
{
248-
source: "/dashboard/payments/settings",
249-
destination: "/dashboard/connect/pay",
250-
permanent: false,
251-
},
252-
{
253-
source: "/dashboard/payments/contracts",
254-
destination: "/dashboard/connect/pay",
255-
permanent: false,
256-
},
257206
// Redirecting as ambassadors lives in community now
258207
{
259208
source: "/ambassadors",
260209
destination: "/community/ambassadors",
261210
permanent: false,
262211
},
263-
{
264-
source: "/dashboard/connect/embedded-wallets",
265-
destination: "/dashboard/connect/in-app-wallets",
266-
permanent: false,
267-
},
268212
{
269213
source: "/embedded-wallets",
270214
destination: "/in-app-wallets",
@@ -321,6 +265,7 @@ function redirects() {
321265
destination: "/account-abstraction",
322266
permanent: false,
323267
},
268+
...legacyDashboardToTeamRedirects,
324269
];
325270
}
326271

apps/dashboard/src/@/api/team.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,8 @@ export type Team = {
1313
bannedAt?: string;
1414
image?: string;
1515
billingPlan: "pro" | "growth" | "free";
16-
billingStatus: "validPayment" | (string & {}); // what's the other value?
17-
billingEmail: string;
18-
// billingExternalId: string;
19-
// billingType: "STRIPE" | ??
20-
// billingCustomerPayload: ?? | null
21-
// paymentAttemptCount: number
22-
// trialPeriodEndedAt: string | null;
16+
billingStatus: "validPayment" | (string & {}) | null;
17+
billingEmail: string | null;
2318
};
2419

2520
export async function getTeamBySlug(slug: string) {

apps/dashboard/src/@/components/DashboardTypeCookieSetter.tsx

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)