Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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=
26 changes: 19 additions & 7 deletions app/[locale]/10years/_components/TorchHistoryCard.tsx
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -50,12 +50,24 @@ const TorchHistoryCard: React.FC<TorchHistoryCardProps> = ({
>
<CardHeader className="flex flex-col p-0">
<div className="mb-4 flex flex-col items-center">
<Avatar
className="h-32 w-32 border-2 border-gray-100/50 !shadow-none"
src={avatar}
href={`https://x.com/${extractTwitterHandle(twitter)}`}
name={name}
/>
<AvatarBase
className={cn(
"h-32 w-32 border-2 border-gray-100/50 !shadow-none",
!twitter && "pointer-events-none"
)}
>
{twitter ? (
<BaseLink href={`https://x.com/${extractTwitterHandle(twitter)}`}>
<AvatarImage src={avatar} alt={name} />
<AvatarFallback>{name[0]}</AvatarFallback>
</BaseLink>
) : (
<>
<AvatarImage src={avatar} alt={name} />
<AvatarFallback>{name[0]}</AvatarFallback>
</>
)}
</AvatarBase>
</div>

{isCurrentHolder && (
Expand Down
11 changes: 7 additions & 4 deletions app/[locale]/10years/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand All @@ -62,7 +65,6 @@ const loadData = dataLoader(
[
["fetched10YearEvents", fetch10YearEvents],
["fetched10YearStories", fetch10YearStories],
["fetchedTorchHolders", fetchTorchHolders],
],
REVALIDATE_TIME * 1000
)
Expand All @@ -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)

Expand Down
4 changes: 0 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ module.exports = (phase, { defaultConfig }) => {
protocol: "https",
hostname: "coin-images.coingecko.com",
},
{
protocol: "https",
hostname: "unavatar.io",
},
],
},
async headers() {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/ui/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const Avatar = React.forwardRef<
sizes="4rem"
src={src}
alt={name}
quality={90}
quality={100}
/>
) : (
<AvatarImage />
Expand All @@ -195,7 +195,7 @@ const Avatar = React.forwardRef<
sizes="4rem"
src={src}
alt={name}
quality={90}
quality={100}
/>
) : (
<AvatarImage />
Expand Down
62 changes: 62 additions & 0 deletions src/data/torchHolders.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
63 changes: 0 additions & 63 deletions src/lib/api/fetchTorchHolders.ts

This file was deleted.

6 changes: 2 additions & 4 deletions src/lib/torch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading