Skip to content

Commit

Permalink
fix: 🐛 put logo height in content instead of component
Browse files Browse the repository at this point in the history
  • Loading branch information
NotRohan committed Jan 29, 2025
1 parent 2299f9a commit d1df0b0
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 47 deletions.
12 changes: 1 addition & 11 deletions src/components/Agentathon/Tracks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ const tracksData = [
},
]

const getLogoHeight = (alt: string): number => {
if (['fileverse', 'rhinestone', 'virtual', 'zerebro', 'eigen', 'duck', 'olas'].includes(alt)) {
return 32
}
if (['arbitrum', 'brahma', 'polymarket'].includes(alt)) {
return 20
}
return 16
}

export default function Tracks({ caption, title, items, buttons }: BaseBlock) {
const [selectedTrack, setSelectedTrack] = useState(0)
const selectedTrackData = items?.[selectedTrack]
Expand Down Expand Up @@ -90,7 +80,7 @@ export default function Tracks({ caption, title, items, buttons }: BaseBlock) {
alt={item.image.alt}
key={index}
style={{
height: getLogoHeight(item.image.alt),
height: item.image.height,
}}
className={css.supportedByLogo}
/>
Expand Down
108 changes: 72 additions & 36 deletions src/content/agentathon.json
Original file line number Diff line number Diff line change
Expand Up @@ -683,79 +683,92 @@
{
"image": {
"src": "/images/Agentathon/tracks/sonic.png",
"alt": "sonic"
"alt": "sonic",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/bitte.png",
"alt": "bitte"
"alt": "bitte",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/heyanon.png",
"alt": "heyanon"
"alt": "heyanon",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/arbitrum.png",
"alt": "arbitrum"
"alt": "arbitrum",
"height": "20px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/brahma.png",
"alt": "brahma"
"alt": "brahma",
"height": "20px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/cowswap.png",
"alt": "cowswap"
"alt": "cowswap",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/linea.png",
"alt": "linea"
"alt": "linea",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/celo.png",
"alt": "celo"
"alt": "celo",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/kraken.png",
"alt": "kraken"
"alt": "kraken",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/creatorbid.png",
"alt": "creatorbid"
"alt": "creatorbid",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/gelato.png",
"alt": "gelato"
"alt": "gelato",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/enso.png",
"alt": "enso"
"alt": "enso",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/avalanche.png",
"alt": "avalanche"
"alt": "avalanche",
"height": "16px"
}
}
]
Expand All @@ -768,19 +781,22 @@
{
"image": {
"src": "/images/Agentathon/tracks/eliza.png",
"alt": "eliza"
"alt": "eliza",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/kiln.png",
"alt": "kiln"
"alt": "kiln",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/kraken.png",
"alt": "kraken"
"alt": "kraken",
"height": "16px"
}
}
]
Expand All @@ -793,13 +809,15 @@
{
"image": {
"src": "/images/Agentathon/tracks/gnosis.png",
"alt": "gnosis"
"alt": "gnosis",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/polymarket.png",
"alt": "polymarket"
"alt": "polymarket",
"height": "24px"
}
}
]
Expand All @@ -812,31 +830,36 @@
{
"image": {
"src": "/images/Agentathon/tracks/eliza.png",
"alt": "eliza"
"alt": "eliza",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/arbitrum.png",
"alt": "arbitrum"
"alt": "arbitrum",
"height": "26px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/optimism.png",
"alt": "optimism"
"alt": "optimism",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/fileverse.png",
"alt": "fileverse"
"alt": "fileverse",
"height": "38px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/rhinestone.png",
"alt": "rhinestone"
"alt": "rhinestone",
"height": "32px"
}
}
]
Expand All @@ -849,31 +872,36 @@
{
"image": {
"src": "/images/Agentathon/tracks/linea.png",
"alt": "linea"
"alt": "linea",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/virtual.png",
"alt": "virtual"
"alt": "virtual",
"height": "32px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/zerebro.png",
"alt": "zerebro"
"alt": "zerebro",
"height": "32px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/story.png",
"alt": "story"
"alt": "story",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/avalanche.png",
"alt": "avalanche"
"alt": "avalanche",
"height": "20px"
}
}
]
Expand All @@ -886,49 +914,57 @@
{
"image": {
"src": "/images/Agentathon/tracks/eliza.png",
"alt": "eliza"
"alt": "eliza",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/olas.png",
"alt": "olas"
"alt": "olas",
"height": "32px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/virtual.png",
"alt": "virtual"
"alt": "virtual",
"height": "32px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/eigen.png",
"alt": "eigen"
"alt": "eigen",
"height": "32px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/duck.png",
"alt": "duck"
"alt": "duck",
"height": "32px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/rhinestone.png",
"alt": "rhinestone"
"alt": "rhinestone",
"height": "32px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/openzeppelin.png",
"alt": "openzeppelin"
"alt": "openzeppelin",
"height": "16px"
}
},
{
"image": {
"src": "/images/Agentathon/tracks/lit.png",
"alt": "lit"
"alt": "lit",
"height": "16px"
}
}
]
Expand Down

0 comments on commit d1df0b0

Please sign in to comment.