|
| 1 | +"use client"; |
| 2 | + |
1 | 3 | import { type ReactElement, useState } from "react"; |
2 | 4 | import { DescriptionInput } from "../../shared/SupportForm_DescriptionInput"; |
3 | 5 | import { SupportForm_SelectInput } from "../../shared/SupportForm_SelectInput"; |
4 | 6 | import { SupportForm_TextInput } from "../../shared/SupportForm_TextInput"; |
5 | | -import { UnitySupportForm } from "../../shared/SupportForm_UnityInput"; |
6 | | -import { AffectedAreaInput } from "./AffectedAreaInput"; |
7 | 7 |
|
8 | 8 | type ProblemAreaItem = { |
9 | 9 | label: string; |
10 | 10 | component: ReactElement; |
11 | 11 | }; |
12 | 12 |
|
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 | +}; |
21 | 28 |
|
22 | | -const OSSelect = () => { |
23 | | - const [selectedOS, setSelectedOS] = useState<string>(""); |
| 29 | +const UserWalletCustomAuthComponent = () => { |
| 30 | + const [description, setDescription] = useState<string>(""); |
24 | 31 | 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 | + </> |
34 | 49 | ); |
35 | 50 | }; |
36 | 51 |
|
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 = () => { |
38 | 69 | const [description, setDescription] = useState<string>(""); |
39 | 70 | return <DescriptionInput value={description} onChange={setDescription} />; |
40 | 71 | }; |
41 | 72 |
|
42 | 73 | const PROBLEM_AREAS: ProblemAreaItem[] = [ |
43 | 74 | { |
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", |
50 | 77 | }, |
51 | 78 | { |
52 | | - component: <AffectedAreaInput />, |
53 | | - label: "In-app wallet Custom Auth", |
| 79 | + component: <UserWalletCustomAuthComponent />, |
| 80 | + label: "User wallet with custom auth", |
54 | 81 | }, |
55 | 82 | { |
56 | | - component: <AffectedAreaInput />, |
| 83 | + component: <AccountAbstractionComponent />, |
57 | 84 | label: "Account Abstraction", |
58 | 85 | }, |
59 | 86 | { |
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", |
114 | 89 | }, |
115 | 90 | ]; |
116 | 91 |
|
|
0 commit comments