diff --git a/.env.example b/.env.example index 8a7f53d7ed8..eec7688be81 100644 --- a/.env.example +++ b/.env.example @@ -48,6 +48,3 @@ ANALYZE=false # Use mock data for development. Set to "false" to use live data but you must have the # environment variables set to make api requests USE_MOCK_DATA=true - -# Google Sheet ID for torch holders -GOOGLE_SHEET_ID_TORCH_HOLDERS= \ No newline at end of file diff --git a/app/[locale]/10years/_components/TorchHistoryCard.tsx b/app/[locale]/10years/_components/TorchHistoryCard.tsx index c60c4ea252b..a1e5a19926f 100644 --- a/app/[locale]/10years/_components/TorchHistoryCard.tsx +++ b/app/[locale]/10years/_components/TorchHistoryCard.tsx @@ -1,6 +1,6 @@ import React from "react" -import { Avatar } from "@/components/ui/avatar" +import { AvatarBase, AvatarFallback, AvatarImage } from "@/components/ui/avatar" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { BaseLink } from "@/components/ui/Link" import { Tag } from "@/components/ui/tag" @@ -50,12 +50,24 @@ const TorchHistoryCard: React.FC = ({ >
- + + {twitter ? ( + + + {name[0]} + + ) : ( + <> + + {name[0]} + + )} +
{isCurrentHolder && ( diff --git a/app/[locale]/10years/page.tsx b/app/[locale]/10years/page.tsx index bbd62cf77a9..53e195fe55a 100644 --- a/app/[locale]/10years/page.tsx +++ b/app/[locale]/10years/page.tsx @@ -22,6 +22,9 @@ import { dataLoader } from "@/lib/utils/data/dataLoader" import { getMetadata } from "@/lib/utils/metadata" import { getRequiredNamespacesForPage } from "@/lib/utils/translations" +// Import static torch holders data +import torchHoldersData from "@/data/torchHolders.json" + import { BASE_TIME_UNIT } from "@/lib/constants" import Curved10YearsText from "./_components/10y.svg" @@ -45,13 +48,13 @@ import { shouldShowNFTMintCard } from "./_components/utils/nftMintDate" import { routing } from "@/i18n/routing" import { fetch10YearEvents } from "@/lib/api/fetch10YearEvents" import { fetch10YearStories } from "@/lib/api/fetch10YearStories" -import { fetchTorchHolders } from "@/lib/api/fetchTorchHolders" import { getCurrentHolder, getHolderEvents, getTransferEvents, isAddressFiltered, isTorchBurned, + type TorchHolder, } from "@/lib/torch" import TenYearLogo from "@/public/images/10-year-anniversary/10-year-logo.png" @@ -62,7 +65,6 @@ const loadData = dataLoader( [ ["fetched10YearEvents", fetch10YearEvents], ["fetched10YearStories", fetch10YearStories], - ["fetchedTorchHolders", fetchTorchHolders], ], REVALIDATE_TIME * 1000 ) @@ -74,8 +76,9 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => { setRequestLocale(locale) - const [fetched10YearEvents, fetched10YearStories, allTorchHolders] = - await loadData() + const [fetched10YearEvents, fetched10YearStories] = await loadData() + + const allTorchHolders: TorchHolder[] = torchHoldersData as TorchHolder[] const stories = parseStoryDates(fetched10YearStories, locale) diff --git a/next.config.js b/next.config.js index 1182cd32334..5c39cb7693e 100644 --- a/next.config.js +++ b/next.config.js @@ -93,10 +93,6 @@ module.exports = (phase, { defaultConfig }) => { protocol: "https", hostname: "coin-images.coingecko.com", }, - { - protocol: "https", - hostname: "unavatar.io", - }, ], }, async headers() { diff --git a/public/images/10-year-anniversary/torchbearers/0x0c004944e16e9065Da1c7dB49F9964E2a3ac8892.jpg b/public/images/10-year-anniversary/torchbearers/0x0c004944e16e9065Da1c7dB49F9964E2a3ac8892.jpg new file mode 100644 index 00000000000..0a03b820a43 Binary files /dev/null and b/public/images/10-year-anniversary/torchbearers/0x0c004944e16e9065Da1c7dB49F9964E2a3ac8892.jpg differ diff --git a/public/images/10-year-anniversary/torchbearers/0x11adBC1B3fd5cb5F29B0052b4AfFe725645b5e4C.jpg b/public/images/10-year-anniversary/torchbearers/0x11adBC1B3fd5cb5F29B0052b4AfFe725645b5e4C.jpg new file mode 100644 index 00000000000..1b15a7da6a3 Binary files /dev/null and b/public/images/10-year-anniversary/torchbearers/0x11adBC1B3fd5cb5F29B0052b4AfFe725645b5e4C.jpg differ diff --git a/public/images/10-year-anniversary/torchbearers/0x36ACC9E5248f33B030d3eA3465AC1f99E55868Ec.jpg b/public/images/10-year-anniversary/torchbearers/0x36ACC9E5248f33B030d3eA3465AC1f99E55868Ec.jpg new file mode 100644 index 00000000000..9b9ea20c6f0 Binary files /dev/null and b/public/images/10-year-anniversary/torchbearers/0x36ACC9E5248f33B030d3eA3465AC1f99E55868Ec.jpg differ diff --git a/public/images/10-year-anniversary/torchbearers/0x54bae63e59B422Dd7C047E375f051D60C37cb60F.jpg b/public/images/10-year-anniversary/torchbearers/0x54bae63e59B422Dd7C047E375f051D60C37cb60F.jpg new file mode 100644 index 00000000000..78d3a8c497d Binary files /dev/null and b/public/images/10-year-anniversary/torchbearers/0x54bae63e59B422Dd7C047E375f051D60C37cb60F.jpg differ diff --git a/public/images/10-year-anniversary/torchbearers/0x648aA14e4424e0825A5cE739C8C68610e143FB79.jpg b/public/images/10-year-anniversary/torchbearers/0x648aA14e4424e0825A5cE739C8C68610e143FB79.jpg new file mode 100644 index 00000000000..579ff40312a Binary files /dev/null and b/public/images/10-year-anniversary/torchbearers/0x648aA14e4424e0825A5cE739C8C68610e143FB79.jpg differ diff --git a/public/images/10-year-anniversary/torchbearers/0x7a16fF8270133F063aAb6C9977183D9e72835428.jpg b/public/images/10-year-anniversary/torchbearers/0x7a16fF8270133F063aAb6C9977183D9e72835428.jpg new file mode 100644 index 00000000000..172a905f938 Binary files /dev/null and b/public/images/10-year-anniversary/torchbearers/0x7a16fF8270133F063aAb6C9977183D9e72835428.jpg differ diff --git a/public/images/10-year-anniversary/torchbearers/0x88C2C3C9E64a1299e6417C24Fa2ae773c6cEa47c.jpg b/public/images/10-year-anniversary/torchbearers/0x88C2C3C9E64a1299e6417C24Fa2ae773c6cEa47c.jpg new file mode 100644 index 00000000000..baa436665a4 Binary files /dev/null and b/public/images/10-year-anniversary/torchbearers/0x88C2C3C9E64a1299e6417C24Fa2ae773c6cEa47c.jpg differ diff --git a/public/images/10-year-anniversary/torchbearers/0xA307A15d113D9763C6fc84768AC34909438bB2EE.jpg b/public/images/10-year-anniversary/torchbearers/0xA307A15d113D9763C6fc84768AC34909438bB2EE.jpg new file mode 100644 index 00000000000..56f93421537 Binary files /dev/null and b/public/images/10-year-anniversary/torchbearers/0xA307A15d113D9763C6fc84768AC34909438bB2EE.jpg differ diff --git a/public/images/10-year-anniversary/torchbearers/0xcc2047a4108033Cb48727B8C69914F40cC0bBC1B.jpg b/public/images/10-year-anniversary/torchbearers/0xcc2047a4108033Cb48727B8C69914F40cC0bBC1B.jpg new file mode 100644 index 00000000000..554cdfb2cd8 Binary files /dev/null and b/public/images/10-year-anniversary/torchbearers/0xcc2047a4108033Cb48727B8C69914F40cC0bBC1B.jpg differ diff --git a/src/components/ui/avatar.tsx b/src/components/ui/avatar.tsx index 5e5c20a09d9..fa2fb3494ab 100644 --- a/src/components/ui/avatar.tsx +++ b/src/components/ui/avatar.tsx @@ -172,7 +172,7 @@ const Avatar = React.forwardRef< sizes="4rem" src={src} alt={name} - quality={90} + quality={100} /> ) : ( @@ -195,7 +195,7 @@ const Avatar = React.forwardRef< sizes="4rem" src={src} alt={name} - quality={90} + quality={100} /> ) : ( diff --git a/src/data/torchHolders.json b/src/data/torchHolders.json new file mode 100644 index 00000000000..9e6d03fc525 --- /dev/null +++ b/src/data/torchHolders.json @@ -0,0 +1,62 @@ +[ + { + "address": "0x88C2C3C9E64a1299e6417C24Fa2ae773c6cEa47c", + "name": "Joseph Lubin", + "role": "Co-founder of Ethereum", + "twitter": "https://x.com/ethereumJoseph" + }, + { + "address": "0x11adBC1B3fd5cb5F29B0052b4AfFe725645b5e4C", + "name": "Audrey Tang", + "role": "Cyber Ambassador, 1st Digital Minister of Taiwan (2016-2024)", + "twitter": "https://x.com/audreyt" + }, + { + "address": "0xcc2047a4108033Cb48727B8C69914F40cC0bBC1B", + "name": "Manoj Gorle", + "role": "Co-president 0xblocsoc, Undergrad IIT Delhi", + "twitter": "https://x.com/manojkgorle" + }, + { + "address": "0x5F19021618AF1cEB5De7Ca112B505F51f813aE18", + "name": "Roman and Alexey Defense Fund", + "role": "", + "twitter": "" + }, + { + "address": "0x7a16fF8270133F063aAb6C9977183D9e72835428", + "name": "Michael Egorov", + "role": "Founder of Curve Finance", + "twitter": "https://x.com/newmichwill" + }, + { + "address": "0x0c004944e16e9065Da1c7dB49F9964E2a3ac8892", + "name": "Letícia Pires", + "role": "CEO Pomodoki", + "twitter": "https://x.com/letispires" + }, + { + "address": "0x54bae63e59B422Dd7C047E375f051D60C37cb60F", + "name": "Ayodeje Ebunayo", + "role": "Founder of Web3Bridge", + "twitter": "https://x.com/Ebunayo08" + }, + { + "address": "0xA307A15d113D9763C6fc84768AC34909438bB2EE", + "name": "Alex Bornyakov", + "role": "The Deputy Minister of Digital Transformation of Ukraine", + "twitter": "https://x.com/abornyakov" + }, + { + "address": "0x648aA14e4424e0825A5cE739C8C68610e143FB79", + "name": "Anthony Sassano", + "role": "Founder of The Daily Gwei", + "twitter": "https://x.com/sassal0x" + }, + { + "address": "0x36ACC9E5248f33B030d3eA3465AC1f99E55868Ec", + "name": "Candela Fassano", + "role": "Builder SEED Latam", + "twitter": "https://x.com/candufaz" + } +] diff --git a/src/lib/api/fetchTorchHolders.ts b/src/lib/api/fetchTorchHolders.ts deleted file mode 100644 index 92e39945868..00000000000 --- a/src/lib/api/fetchTorchHolders.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { resolveEnsName, type TorchHolder } from "@/lib/torch" - -export async function fetchTorchHolders(): Promise { - const googleApiKey = process.env.GOOGLE_API_KEY - const sheetId = process.env.GOOGLE_SHEET_ID_TORCH_HOLDERS - - if (!googleApiKey) { - console.warn("Google API key not set") - return [] - } - - if (!sheetId) { - console.warn("Google Sheet ID for torch holders not set") - return [] - } - - try { - const url = `https://sheets.googleapis.com/v4/spreadsheets/${sheetId}/values/Website%20Info!A:E?majorDimension=ROWS&key=${googleApiKey}` - const response = await fetch(url) - - if (!response.ok) { - const errorText = await response.text() - console.error("Google Sheets API Error:", { - status: response.status, - statusText: response.statusText, - error: errorText, - }) - throw new Error( - `Google Sheets API responded with ${response.status}: ${response.statusText}` - ) - } - - const data = await response.json() - // data.values[0] is the header row - const rows = data.values.slice(1) || [] - - // Map rows to TorchHolder objects with ENS resolution - const holders: TorchHolder[] = [] - - for (const row of rows) { - if (!row[0]) continue // must have address or ENS name - - const addressOrEns = row[0].trim() - const resolvedAddress = await resolveEnsName(addressOrEns) - - if (resolvedAddress) { - holders.push({ - address: resolvedAddress, - name: row[1] || "", - role: row[2] || "", - twitter: row[3] || "", - }) - } else { - console.warn(`Could not resolve address or ENS name: ${addressOrEns}`) - } - } - - return holders - } catch (error) { - console.error("Error fetching torch holders from Google Sheets:", error) - return [] - } -} diff --git a/src/lib/torch/index.ts b/src/lib/torch/index.ts index 51b606ccd0f..9390bd7c307 100644 --- a/src/lib/torch/index.ts +++ b/src/lib/torch/index.ts @@ -125,10 +125,8 @@ export const getAvatarImage = (holder: TorchHolderMetadata | null) => { // If there's a Twitter handle, use Twitter profile image if (holder.twitter && holder.twitter.trim() !== "") { - const twitterHandle = extractTwitterHandle(holder.twitter) - if (twitterHandle) { - return `https://unavatar.io/x/${twitterHandle}` - } + const address = holder.address + return `/images/10-year-anniversary/torchbearers/${address}.jpg` } // Otherwise, fall back to blockie