Skip to content

Commit 2abfa5a

Browse files
committed
support form changes
1 parent 144bb33 commit 2abfa5a

File tree

5 files changed

+117
-132
lines changed

5 files changed

+117
-132
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/support/_components/SupportTicketForm.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const EngineSupportForm = dynamic(
2626
ssr: false,
2727
},
2828
);
29-
const ContractSupportForm = dynamic(
29+
const _ContractSupportForm = dynamic(
3030
() =>
3131
import("./contact-forms/contracts").then((mod) => mod.ContractSupportForm),
3232
{
@@ -48,7 +48,7 @@ const OtherSupportForm = dynamic(
4848
ssr: false,
4949
},
5050
);
51-
const PaymentsSupportForm = dynamic(
51+
const _PaymentsSupportForm = dynamic(
5252
() =>
5353
import("./contact-forms/payments").then((mod) => mod.PaymentsSupportForm),
5454
{
@@ -68,13 +68,14 @@ const TokensMarketplaceSupportForm = dynamic(
6868
);
6969

7070
const productOptions = [
71-
{ component: <ConnectSupportForm />, label: "Wallets" },
72-
{ component: <EngineSupportForm />, label: "Transactions" },
73-
{ component: <PaymentsSupportForm />, label: "Payments" },
74-
{ component: <ContractSupportForm />, label: "Contracts" },
71+
{ component: <ConnectSupportForm />, label: "Working with User Wallets" },
72+
{
73+
component: <EngineSupportForm />,
74+
label: "Using API/SDK’s, errored transactions",
75+
},
7576
{
7677
component: <TokensMarketplaceSupportForm />,
77-
label: "Tokens / Marketplace",
78+
label: "Creating, Bridging and swapping tokens",
7879
},
7980
{ component: <AccountSupportForm />, label: "Account" },
8081
{ component: <OtherSupportForm />, label: "Other" },

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/support/_components/contact-forms/connect/index.tsx

Lines changed: 60 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,91 @@
1+
"use client";
2+
13
import { type ReactElement, useState } from "react";
24
import { DescriptionInput } from "../../shared/SupportForm_DescriptionInput";
35
import { SupportForm_SelectInput } from "../../shared/SupportForm_SelectInput";
46
import { SupportForm_TextInput } from "../../shared/SupportForm_TextInput";
5-
import { UnitySupportForm } from "../../shared/SupportForm_UnityInput";
6-
import { AffectedAreaInput } from "./AffectedAreaInput";
77

88
type ProblemAreaItem = {
99
label: string;
1010
component: ReactElement;
1111
};
1212

13-
const SDKVersionInput = () => (
14-
<SupportForm_TextInput
15-
formLabel="SDK Version"
16-
formValue="extraInfo_SDK_Version"
17-
inputType="text"
18-
required={true}
19-
/>
20-
);
13+
const SocialEmailLoginIssuesComponent = () => {
14+
const [description, setDescription] = useState<string>("");
15+
return (
16+
<>
17+
<SupportForm_TextInput
18+
formLabel="User ID/Email with issue"
19+
formValue="extraInfo_User_ID_Email"
20+
inputType="text"
21+
placeholder="Enter user ID or email"
22+
required={true}
23+
/>
24+
<DescriptionInput value={description} onChange={setDescription} />
25+
</>
26+
);
27+
};
2128

22-
const OSSelect = () => {
23-
const [selectedOS, setSelectedOS] = useState<string>("");
29+
const UserWalletCustomAuthComponent = () => {
30+
const [description, setDescription] = useState<string>("");
2431
return (
25-
<SupportForm_SelectInput
26-
formLabel="OS"
27-
name="extraInfo_OS"
28-
onValueChange={setSelectedOS}
29-
options={["Windows", "MacOS", "Linux", "Other"]}
30-
promptText="Select an operating system"
31-
required={true}
32-
value={selectedOS}
33-
/>
32+
<>
33+
<SupportForm_TextInput
34+
formLabel="Custom auth endpoint"
35+
formValue="extraInfo_Custom_Auth_Endpoint"
36+
inputType="text"
37+
placeholder="Enter custom auth endpoint"
38+
required={true}
39+
/>
40+
<SupportForm_TextInput
41+
formLabel="Support ID"
42+
formValue="extraInfo_Support_ID"
43+
inputType="text"
44+
placeholder="Enter support ID (optional)"
45+
required={false}
46+
/>
47+
<DescriptionInput value={description} onChange={setDescription} />
48+
</>
3449
);
3550
};
3651

37-
const DescriptionInputWrapper = () => {
52+
const AccountAbstractionComponent = () => {
53+
const [description, setDescription] = useState<string>("");
54+
return (
55+
<>
56+
<SupportForm_TextInput
57+
formLabel="Support ID"
58+
formValue="extraInfo_Support_ID"
59+
inputType="text"
60+
placeholder="Enter support ID (optional)"
61+
required={false}
62+
/>
63+
<DescriptionInput value={description} onChange={setDescription} />
64+
</>
65+
);
66+
};
67+
68+
const ThirdPartyEOAWalletsComponent = () => {
3869
const [description, setDescription] = useState<string>("");
3970
return <DescriptionInput value={description} onChange={setDescription} />;
4071
};
4172

4273
const PROBLEM_AREAS: ProblemAreaItem[] = [
4374
{
44-
component: <AffectedAreaInput />,
45-
label: "In-app wallet login issues",
46-
},
47-
{
48-
component: <AffectedAreaInput />,
49-
label: "In-app wallet transaction issues",
75+
component: <SocialEmailLoginIssuesComponent />,
76+
label: "Social/Email login issues",
5077
},
5178
{
52-
component: <AffectedAreaInput />,
53-
label: "In-app wallet Custom Auth",
79+
component: <UserWalletCustomAuthComponent />,
80+
label: "User wallet with custom auth",
5481
},
5582
{
56-
component: <AffectedAreaInput />,
83+
component: <AccountAbstractionComponent />,
5784
label: "Account Abstraction",
5885
},
5986
{
60-
component: (
61-
<>
62-
<SDKVersionInput />
63-
<SupportForm_TextInput
64-
formLabel="Application URL"
65-
formValue="extraInfo_Application_URL"
66-
inputType="url"
67-
required={false}
68-
/>
69-
<DescriptionInputWrapper />
70-
</>
71-
),
72-
label: "thirdweb SDKs",
73-
},
74-
{
75-
component: (
76-
<>
77-
<UnitySupportForm />
78-
<SDKVersionInput />
79-
<DescriptionInputWrapper />
80-
</>
81-
),
82-
label: "Unity SDK",
83-
},
84-
{
85-
component: (
86-
<>
87-
<SDKVersionInput />
88-
<OSSelect />
89-
<SupportForm_TextInput
90-
formLabel="Framework"
91-
formValue="extraInfo_dotNET_Framework"
92-
inputType="text"
93-
placeholder="MAUI | Blazor | Godot, etc"
94-
required={false}
95-
/>
96-
<SupportForm_TextInput
97-
formLabel="Target OS"
98-
formValue="extraInfo_dotNET_Target_OS"
99-
inputType="text"
100-
required={false}
101-
/>
102-
<DescriptionInputWrapper />
103-
</>
104-
),
105-
label: ".NET SDK",
106-
},
107-
{
108-
component: <AffectedAreaInput />,
109-
label: "Pay",
110-
},
111-
{
112-
component: <AffectedAreaInput />,
113-
label: "Auth",
87+
component: <ThirdPartyEOAWalletsComponent />,
88+
label: "Third party/EOA wallets",
11489
},
11590
];
11691

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/support/_components/contact-forms/engine/index.tsx

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,56 @@ import { DescriptionInput } from "../../shared/SupportForm_DescriptionInput";
33
import { SupportForm_SelectInput } from "../../shared/SupportForm_SelectInput";
44
import { SupportForm_TextInput } from "../../shared/SupportForm_TextInput";
55

6-
const ENGINE_TYPES = ["Cloud (V3)", "Dedicated (V2)"];
7-
const ENGINE_PROBLEM_AREAS = [
8-
"SSL Issues",
9-
"Transaction queueing issues",
10-
"401 - Unauthorized",
11-
"404 - Endpoint Not Found",
12-
"Other",
6+
const API_SDK_OPTIONS = [
7+
"API endpoint",
8+
"React/TypeScript",
9+
"Unity/.NET",
10+
"React Native",
1311
];
1412

1513
export function EngineSupportForm() {
16-
const [selectedEngineType, setSelectedEngineType] = useState<string>("");
17-
const [problemArea, setProblemArea] = useState<string>("");
14+
const [selectedSDK, setSelectedSDK] = useState<string>("");
1815
const [description, setDescription] = useState<string>("");
1916

2017
return (
2118
<>
2219
<SupportForm_SelectInput
23-
formLabel="Type"
24-
name="extraInfo_Engine_Type"
25-
onValueChange={setSelectedEngineType}
26-
options={ENGINE_TYPES}
27-
promptText="Select Engine type"
20+
formLabel="Which API/SDK are you using?"
21+
name="extraInfo_API_SDK"
22+
onValueChange={setSelectedSDK}
23+
options={API_SDK_OPTIONS}
24+
promptText="Select a problem area"
2825
required={true}
29-
value={selectedEngineType}
30-
/>{" "}
31-
{selectedEngineType && (
26+
value={selectedSDK}
27+
/>
28+
{selectedSDK && (
3229
<>
33-
<SupportForm_SelectInput
34-
formLabel="Problem area"
35-
name="extraInfo_Problem_Area"
36-
onValueChange={setProblemArea}
37-
options={ENGINE_PROBLEM_AREAS}
38-
promptText="Select a problem area"
39-
required={true}
40-
value={problemArea}
30+
{selectedSDK !== "API endpoint" && (
31+
<SupportForm_TextInput
32+
formLabel="Version of SDK"
33+
formValue="extraInfo_SDK_Version"
34+
inputType="text"
35+
placeholder="e.g. 3.12.0"
36+
required={true}
37+
/>
38+
)}
39+
<SupportForm_TextInput
40+
formLabel="Queue/Support ID in logs"
41+
formValue="extraInfo_Queue_Support_ID"
42+
inputType="text"
43+
placeholder="Enter support ID from logs"
44+
required={false}
4145
/>
42-
43-
{problemArea && (
44-
<>
45-
<SupportForm_TextInput
46-
formLabel="Engine URL"
47-
formValue="extraInfo_Engine_URL"
48-
inputType="url"
49-
placeholder="https://your-engine-url.com"
50-
required={true}
51-
/>
52-
<DescriptionInput value={description} onChange={setDescription} />
53-
</>
46+
{selectedSDK === "API endpoint" && (
47+
<SupportForm_TextInput
48+
formLabel="API endpoint URL with parameters"
49+
formValue="extraInfo_API_Endpoint_URL"
50+
inputType="url"
51+
placeholder="https://api.example.com/endpoint?param=value"
52+
required={false}
53+
/>
5454
)}
55+
<DescriptionInput value={description} onChange={setDescription} />
5556
</>
5657
)}
5758
</>

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/support/_components/contact-forms/other/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const OTHER_PROBLEM_AREAS = [
1414
"Bug report",
1515
"Documentation",
1616
"Integration help",
17+
"Agents/x402 and AI",
1718
"Other",
1819
];
1920
export function OtherSupportForm() {

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/support/_components/contact-forms/tokens-marketplace/index.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ export function TokensMarketplaceSupportForm() {
88
return (
99
<>
1010
<SupportForm_TextInput
11-
formLabel="Address"
12-
formValue="extraInfo_TokensMarketplace_Address"
11+
formLabel="Token address or symbol"
12+
formValue="extraInfo_Token_Address_Symbol"
1313
inputType="text"
14-
placeholder="Enter the relevant address"
14+
placeholder="Enter token address or symbol (e.g. 0x... or ETH)"
1515
required={true}
1616
/>
1717
<SupportForm_TextInput
@@ -21,6 +21,13 @@ export function TokensMarketplaceSupportForm() {
2121
placeholder="e.g. Ethereum, Polygon, etc."
2222
required={true}
2323
/>
24+
<SupportForm_TextInput
25+
formLabel="Support ID in logs"
26+
formValue="extraInfo_Support_ID_Logs"
27+
inputType="text"
28+
placeholder="Enter support ID from logs"
29+
required={false}
30+
/>
2431
<DescriptionInput value={description} onChange={setDescription} />
2532
</>
2633
);

0 commit comments

Comments
 (0)