Skip to content

Commit d4aef53

Browse files
committed
Delete /support page
1 parent 8da71ed commit d4aef53

File tree

14 files changed

+20
-228
lines changed

14 files changed

+20
-228
lines changed

apps/dashboard/redirects.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,11 @@ async function redirects() {
448448
...legacyDashboardToTeamRedirects,
449449
...projectPageRedirects,
450450
...teamPageRedirects,
451+
{
452+
source: "/support/:path*",
453+
destination: "/team/~/~/support",
454+
permanent: false,
455+
},
451456
];
452457
}
453458

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ export async function createSupportTicket(params: {
1818
}
1919

2020
try {
21-
// Fetch wallet address (server-side)
2221
const walletAddress = await getAuthTokenWalletAddress();
2322

24-
// URL encode the team slug to handle special characters like #
2523
const encodedTeamSlug = encodeURIComponent(params.teamSlug);
2624
const apiUrl = `${NEXT_PUBLIC_THIRDWEB_API_HOST}/v1/teams/${encodedTeamSlug}/support-conversations`;
2725

@@ -106,12 +104,10 @@ export async function sendMessageToTicket(request: {
106104
}
107105

108106
try {
109-
// URL encode the team slug and ticket ID to handle special characters like #
110107
const encodedTeamSlug = encodeURIComponent(request.teamSlug);
111108
const encodedTicketId = encodeURIComponent(request.ticketId);
112109
const apiUrl = `${NEXT_PUBLIC_THIRDWEB_API_HOST}/v1/teams/${encodedTeamSlug}/support-conversations/${encodedTicketId}/messages`;
113110

114-
// Build the payload for sending a message
115111
// Append /unthread send for customer messages to ensure proper routing
116112
const messageWithUnthread = `${request.message.trim()}\n/unthread send`;
117113
const payload = {

apps/dashboard/src/@/components/chat/CustomChats.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,7 @@ export function CustomChats(props: {
184184
setSupportTicketCreated(true);
185185
// Add success message as a regular assistant message
186186
if (props.addSuccessMessage) {
187-
const supportPortalUrl = props.team
188-
?.slug
189-
? `/team/${props.team.slug}/~/support`
190-
: "/support";
187+
const supportPortalUrl = `/team/${props.team.slug}/~/support`;
191188
props.addSuccessMessage(
192189
`Your support ticket has been created! Our team will get back to you soon. You can also visit the [support portal](${supportPortalUrl}) to track your case.`,
193190
);

apps/dashboard/src/@/contexts/error-handler.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,13 @@ export const ErrorProvider: ComponentWithChildren = ({ children }) => {
150150
/>
151151
)}
152152

153-
<Button asChild className="py-2 text-sm" variant="primary">
154-
<Link href="/support" rel="noopener noreferrer" target="_blank">
155-
Visit support site
153+
<Button asChild className="py-2 text-sm" variant="default">
154+
<Link
155+
href="/team/~/~/support"
156+
rel="noopener noreferrer"
157+
target="_blank"
158+
>
159+
Contact Support
156160
</Link>
157161
</Button>
158162
</div>

apps/dashboard/src/@/utils/errorParser.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import type { JSX } from "react";
44

55
const PLEASE_REACH_OUT_MESSAGE = (
66
<span>
7-
If you believe this is incorrect or the error persists, please visit our{" "}
7+
If you believe this is incorrect or the error persists, please{" "}
88
<Link
99
className="font-semibold underline"
10-
href="/support"
10+
href="/team/~/~/support"
1111
rel="noopener noreferrer"
1212
target="_blank"
1313
>
14-
support site
14+
contact support
1515
</Link>
1616
.
1717
</span>

apps/dashboard/src/app/(app)/(dashboard)/support/layout.tsx

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

apps/dashboard/src/app/(app)/(dashboard)/support/page.tsx

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

apps/dashboard/src/app/(app)/account/settings/AccountSettingsPageUI.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ function DeleteAccountCard(props: {
285285
variant="outline"
286286
>
287287
<Link
288-
href="/support/create-ticket"
288+
href="/team/~/~/support"
289289
rel="noopener noreferrer"
290290
target="_blank"
291291
>

apps/dashboard/src/app/(app)/components/MobileBurgerMenuButton.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,6 @@ export function MobileBurgerMenuButton(
191191
Docs
192192
</Link>
193193

194-
<Link
195-
className="text-muted-foreground hover:text-foreground "
196-
href="/support"
197-
rel="noopener noreferrer"
198-
target="_blank"
199-
>
200-
Support
201-
</Link>
202-
203194
<Link
204195
className="text-muted-foreground hover:text-foreground"
205196
href="https://feedback.thirdweb.com"

0 commit comments

Comments
 (0)