-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathindex.tsx
More file actions
270 lines (261 loc) · 10.7 KB
/
index.tsx
File metadata and controls
270 lines (261 loc) · 10.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
'use client';
import { useState, useCallback } from 'react';
import { Icon } from 'base-ui';
import {
RegistrationSteps,
useRegistration,
} from 'apps/web/src/components/Basenames/RegistrationContext';
import classNames from 'classnames';
function FaqItem({ question, answer }: { question: string; answer: JSX.Element | string }) {
const [isOpen, setIsOpen] = useState(false);
const toggleOpen = useCallback(() => {
setIsOpen((prevIsOpen) => !prevIsOpen);
}, []);
return (
<div className="border-b border-[#5B616E]/20">
<button
className="text-gray-800 flex w-full items-center justify-between py-4 text-left font-medium focus:outline-none"
onClick={toggleOpen}
type="button"
>
<span>{question}</span>
<Icon name="caret" width="24" height="24" color="black" />
</button>
<div
className={`overflow-hidden transition-all duration-300 ${
isOpen ? 'max-h-screen' : 'max-h-0'
}`}
>
<div className="text-gray-600 pb-4">{answer}</div>
</div>
</div>
);
}
export default function RegistrationFAQ() {
const { registrationStep } = useRegistration();
const isSearch = registrationStep === RegistrationSteps.Search;
return (
<section
className={classNames('mx-auto max-w-6xl px-4 pb-36 md:pt-20', {
hidden: !isSearch,
'display: block': isSearch,
})}
>
<div className="flex flex-col items-center lg:flex-row">
<div className="mb-8 w-full text-left lg:mb-0 lg:w-1/2">
<h2 className="mb-8 text-5xl font-normal md:text-6xl">
Questions? <br /> See our FAQ
</h2>
<p className="max-w-md text-xl">
Get more answers in our FAQ, and view our developer docs to see how you can build with
Basenames.
</p>
</div>
<div className="w-full lg:w-1/2">
<FaqItem
question="What are Basenames?"
answer={
<p>
Basenames are a core onchain building block that enable builders to establish their
identity on Base by registering human-readable names for their wallet address(es).
They are fully onchain, built on the same technology powering ENS names, and
deployed on Base. These human-readable names can be used when connecting to onchain
apps, and sending and receiving on Base and any other EVM chain.
</p>
}
/>
<FaqItem
question="What are the Basename registration fees?"
answer={
<div>
<p className="mb-6 leading-relaxed">
Basenames are priced based on name length, and are designed to be globally
accessible. Annual registration fees are as follows:
</p>
<div className="flex justify-center">
<table className="border-gray-300 border-collapse border">
<thead>
<tr>
<th className="border-gray-300 border px-4 py-2">Length</th>
<th className="border-gray-300 border px-4 py-2">Price</th>
</tr>
</thead>
<tbody>
<tr>
<td className="border-gray-300 border px-4 py-2">3 characters</td>
<td className="border-gray-300 border px-4 py-2">0.1 ETH</td>
</tr>
<tr>
<td className="border-gray-300 border px-4 py-2">4 characters</td>
<td className="border-gray-300 border px-4 py-2">0.01 ETH</td>
</tr>
<tr>
<td className="border-gray-300 border px-4 py-2">5-9 characters</td>
<td className="border-gray-300 border px-4 py-2">0.001 ETH</td>
</tr>
<tr>
<td className="border-gray-300 border px-4 py-2">10+ characters</td>
<td className="border-gray-300 border px-4 py-2">0.0001 ETH</td>
</tr>
</tbody>
</table>
</div>
</div>
}
/>
<FaqItem
question="How do I get a free or discounted Basename?"
answer={
<div className="text-gray-800 mx-auto max-w-3xl p-6 font-sans">
<p className="mb-4">
You can get one free Basename (5+ letters) for one year if you meet any of the
below criteria:
</p>
<ul className="mb-4 list-disc space-y-2 pl-6">
<li>
<a
href="http://coinbase.com/onchain-verify"
className="text-blue-600 hover:underline"
>
Coinbase Verification
</a>
</li>
<li>
<a
href="http://coinbase.com/onchain-verify"
className="text-blue-600 hover:underline"
>
Coinbase One Verification
</a>
</li>
<li>
<a
href="https://wallet.coinbase.com/ocs"
className="text-blue-600 hover:underline"
>
Summer Pass Level 3 NFT
</a>
</li>
<li>
<a
href="https://onchain-summer.devfolio.co/"
className="text-blue-600 hover:underline"
>
Buildathon participant NFT
</a>
</li>
<li>
<a
href="https://opensea.io/collection/base-org-base-eth"
className="text-blue-600 hover:underline"
>
base.eth NFT holder
</a>
</li>
<li>cb.id username (acquired prior to Fri Aug 9, 2024)</li>
<li>
<a href="http://basename.app" className="text-blue-600 hover:underline">
BNS name owner - free 4+ letter name (basename.app)
</a>
</li>
</ul>
<p className="mb-4">
An equivalent-value discount of 0.001 ETH will be applied if registering a shorter
name, or registering for more than 1 year, with the exception of the BNS name
owner discount (valued at 0.01 ETH per unique address). You will need to pay the
standard registration fees if you wish to keep your Basename after your initial
discount has been fully applied.
</p>
<p className="mb-4">
Discounts are only applied once, and are limited to one per address. Even if you
meet multiple criteria, you will only be eligible for a single discount on one
Basename. If you satisfy multiple criteria, we will automatically apply the
highest-value discount to your registration.
</p>
<p className="mb-4">
We are always looking to add more discounts. If you or your project have ideas for
more discounts, please reach out to our team.
</p>
</div>
}
/>
<FaqItem
question="How can I use Basenames?"
answer={
<p>
You can use your Basename across apps in the Base ecosystem, starting with base.org,
Onchain Registry, and Onchain Summer Pass. You can also use it for sending and
receiving on Base and other EVM chains.
</p>
}
/>
<FaqItem
question="Is my profile information published onchain?"
answer={
<p>
Basenames are fully onchain, and therefore any information you publish is recorded
onchain, requires a transaction, and will be broadly composable with the rest of the
ecosystem. Please do not publish any information you do not wish to be onchain.
</p>
}
/>
<FaqItem
question="I am a builder. How do I integrate Basenames to my app?"
answer={
<p>
If you're a builder looking to integrate Basenames into your app,{' '}
<a
href="https://github.com/coinbase/onchainkit"
className="text-blue-600 hover:underline"
>
OnchainKit
</a>{' '}
is the easiest way to get started (
<a
href="https://docs.base.org/identity/basenames/basenames-onchainkit-tutorial"
className="text-blue-600 hover:underline"
>
tutorial here
</a>
). If you have ideas for new features or badges that you'd like to integrate
with Basenames, we'd love to hear from you.
</p>
}
/>
<FaqItem
question="How do I get a Basename for my app or project?"
answer={
<div>
<p className="mb-4">
You can register a Basename for your app just like any other Basename. If a
Basename for your app or project is not available, there is a good chance it was
reserved.
</p>
<p className="mb-4">
Please reach out to our team or fill out{' '}
<a
href="https://app.deform.cc/form/20372eb6-ec97-4d37-967f-d36f4b7f4eb2"
className="text-blue-600 hover:underline"
>
this form
</a>{' '}
and we will reach out with instructions.
</p>
<p>
Visit{' '}
<a
href="https://docs.base.org/docs/tools/basenames-faq"
className="text-blue-600 hover:underline"
>
FAQs
</a>{' '}
to learn more.
</p>
</div>
}
/>
</div>
</div>
</section>
);
}