Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 5 additions & 97 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ export default function Home() {
</PopoverTrigger>
<PopoverContent className="w-32 grid grid-cols-2 gap-2">
{amountOptions.map((option) => (
<Button variant="outline" onClick={() => setAmount(option)}>
<Button
key={option}
variant="outline"
onClick={() => setAmount(option)}
>
{option}
</Button>
))}
Expand Down Expand Up @@ -203,102 +207,6 @@ export default function Home() {
</div>

<div className="pointer-events-none abolute top-1/2 mb-20 ml-32 left-1/2 -translate-x-1/2 translate-y-1/2 w-52 h-28 bg-rose-600/70 blur-[120px]"></div>

{/* <div
className="bg-[#23F0C7] text-white rounded-lg p-8 m-4 w-4/5 max-w-lg transition-all duration-500 ease-in-out transform hover:translate-y-[-2px] drop-shadow-2xl opacity-100 hover:opacity-90"
style={{
boxShadow: "20px 20px 60px #1f9fa6, -20px -20px 60px #27ffb2",
}}
>
<div className="mb-4">
<label
className="block text-[#5B2A86] text-sm font-bold mb-2"
htmlFor="wallet"
>
Wallet Address
</label>
<input
className="shadow-md appearance-none rounded py-2 px-3 w-full text-[#FFB2E6] bg-[#D972FF] mb-3 leading-tight focus:outline-none focus:shadow-outline shadow-[#FFB2E6] h-14 placeholder:text-[#FFB2E6]"
id="wallet"
type="text"
value={walletAddress}
onChange={handleWalletChange}
placeholder="Enter your wallet address"
/>
{errors.wallet && (
<p className="text-red-500 text-xs italic">{errors.wallet}</p>
)}
</div>
<div className="mb-6">
<label
className="block text-[#5B2A86] text-sm font-bold mb-2"
htmlFor="amount"
>
Amount
</label>
<input
className="shadow-md appearance-none rounded py-2 px-3 text-[#FFB2E6] bg-[#D972FF] mb-3 leading-tight focus:outline-none focus:shadow-outline shadow-[#FFB2E6] h-14 placeholder:text-[#FFB2E6]"
id="amount"
type="number"
value={amount || ""}
onChange={handleAmountChange}
max={5}
placeholder="Enter the amount"
/>
{errors.amount && (
<p className="text-red-500 text-xs italic">{errors.amount}</p>
)}
<div className="flex w-40">
{amountOptions.map((option) => (
<button
key={option}
onClick={() => setAmount(option)}
className="mr-2 bg-[#5B2A86] hover:bg-[#360568] text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline shadow-2xl transition-all duration-500 ease-in-out transform hover:translate-y-[-2px]"
>
{option}
</button>
))}
</div>
</div>
<div className="mb-6">
<Turnstile
sitekey="0x4AAAAAAAHKo-ZE1jhM2pyN"
onVerify={(token) => setCloudflareCallback(token)}
refreshExpired="auto"
theme="dark"
className="max-w-fit rounded-lg"
/>
</div>
<div className="flex items-center justify-between">
<button
className={`bg-[#5B2A86] hover:bg-[#360568] text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline shadow-2xl transition-all duration-500 ease-in-out transform hover:translate-y-[-2px] ${
!isFormValid() ? "opacity-60 cursor-not-allowed" : "opacity-100"
}`}
type="button"
disabled={!isFormValid()}
style={{
boxShadow:
"inset 5px 5px 10px #1b4b8a, inset -5px -5px 10px #360568",
}}
onClick={requestAirdrop}
>
Request
</button>
</div>
<div>
{hasRequested && (
<button
onClick={() => window.location.reload()}
className="bg-[#5B2A86] hover:bg-[#360568] text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline shadow-2xl transition-all duration-500 ease-in-out transform hover:translate-y-[-2px] mt-4"
>
Reload page
</button>
)}
<p className="text-xs mt-3 text-[#5B2A86]">
Maximum of two requests per hour.
</p>
</div>
</div>*/}
</div>
);
}