From 28f35081d90bf65af74aa9fcc38c71c74ea907ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?txb=C3=AC?= <46839250+0xTxbi@users.noreply.github.com> Date: Thu, 27 Feb 2025 14:28:45 +0100 Subject: [PATCH] feature(airdrops): Improve visuals on mobile and cleanup (#15572) * improve spacing on mobile * update util comments * update campaign detail ui * remove unused dependency * update yarn lock --- airdrops/components/CampaignDetailContent.tsx | 10 ++++++---- airdrops/components/layout/Container.tsx | 2 +- airdrops/package.json | 1 - airdrops/src/utils/eligibility.ts | 3 +-- yarn.lock | 15 +-------------- 5 files changed, 9 insertions(+), 22 deletions(-) diff --git a/airdrops/components/CampaignDetailContent.tsx b/airdrops/components/CampaignDetailContent.tsx index 8b2b8fff754..57d5e1fb4b4 100644 --- a/airdrops/components/CampaignDetailContent.tsx +++ b/airdrops/components/CampaignDetailContent.tsx @@ -147,14 +147,16 @@ export default function CampaignDetailContent({ {/* Full-width title and description */}
-

{airdrop.name}

-

{airdrop.description}

+

{airdrop.name}

+

+ {airdrop.description} +

{/* Two-column layout for remaining content */}
{/* Left Column */} -
+
-

Claim Your Rewards

+

Claim Your Rewards

{authenticated ? (
diff --git a/airdrops/components/layout/Container.tsx b/airdrops/components/layout/Container.tsx index 528545461e5..07bd1677505 100644 --- a/airdrops/components/layout/Container.tsx +++ b/airdrops/components/layout/Container.tsx @@ -4,5 +4,5 @@ interface Props { } export const Container = ({ children }: Props) => { - return
{children}
+ return
{children}
} diff --git a/airdrops/package.json b/airdrops/package.json index e0d068159a8..62eaa9ff8b8 100644 --- a/airdrops/package.json +++ b/airdrops/package.json @@ -27,7 +27,6 @@ "eslint": "9.11.1", "ethers": "6.13.5", "next": "14.2.21", - "react-hot-toast": "2.4.1", "react-markdown": "10.0.0", "tailwind-merge": "3.0.1", "typescript": "5.6.3" diff --git a/airdrops/src/utils/eligibility.ts b/airdrops/src/utils/eligibility.ts index 486a3c40b10..5cf7a543aa2 100644 --- a/airdrops/src/utils/eligibility.ts +++ b/airdrops/src/utils/eligibility.ts @@ -3,8 +3,7 @@ import { AirdropData } from '../../components/Campaigns' /** * Checks if an address is eligible for an airdrop and returns the token amount - * This is a temporary implementation that randomly determines eligibility - * To be replaced with actual implementation that checks against the recipients file + * Fetches the recipients file and checks if the address exists in it */ export const isEligible = async ( address: string, diff --git a/yarn.lock b/yarn.lock index 598d40a4ab1..177e547e74d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18641,7 +18641,6 @@ __metadata: jsdom: "npm:26.0.0" next: "npm:14.2.21" postcss: "npm:8.4.49" - react-hot-toast: "npm:2.4.1" react-markdown: "npm:10.0.0" tailwind-merge: "npm:3.0.1" tailwindcss: "npm:3.4.17" @@ -31620,7 +31619,7 @@ __metadata: languageName: node linkType: hard -"goober@npm:^2.1.10, goober@npm:^2.1.16": +"goober@npm:^2.1.16": version: 2.1.16 resolution: "goober@npm:2.1.16" peerDependencies: @@ -44457,18 +44456,6 @@ __metadata: languageName: node linkType: hard -"react-hot-toast@npm:2.4.1": - version: 2.4.1 - resolution: "react-hot-toast@npm:2.4.1" - dependencies: - goober: "npm:^2.1.10" - peerDependencies: - react: ">=16" - react-dom: ">=16" - checksum: 10/9af91efdb98837e39a126aff084b54db0336c5f88a7dad7c42daf7ee873d06a79d6e59f398412cc250a35ddf1a73c25700fe90b3c3a2a0c394fd17d99b2bcf8b - languageName: node - linkType: hard - "react-hot-toast@npm:2.5.2": version: 2.5.2 resolution: "react-hot-toast@npm:2.5.2"