From da33ea5bbb2c2c92ea005d9415be66db4ab17496 Mon Sep 17 00:00:00 2001 From: katty barroso Date: Thu, 11 Jul 2024 09:51:30 -0500 Subject: [PATCH 1/2] Add polkadot to partners list --- data/home.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data/home.json b/data/home.json index 6084e206..e2b304bf 100644 --- a/data/home.json +++ b/data/home.json @@ -43,8 +43,11 @@ { "image": "./images/partner/arbitrum.svg", "alt": "Arbitrum" + }, + { + "image": "./images/partner/polkadot.svg", + "alt": "Polkadot" } - ] }, "testimonials": { From 5f87d7d1b799aecfe6d069966b8a5d606721e1a5 Mon Sep 17 00:00:00 2001 From: katty barroso Date: Thu, 11 Jul 2024 11:13:32 -0500 Subject: [PATCH 2/2] Fix styling images --- src/components/Image.tsx | 9 +++++---- src/components/partner-list/index.tsx | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/Image.tsx b/src/components/Image.tsx index 67c4edb9..35427b79 100644 --- a/src/components/Image.tsx +++ b/src/components/Image.tsx @@ -10,22 +10,23 @@ export type ImageProps = { } alt?: string objectFit?: CSSProperties['objectFit'] - objectPosition?: CSSProperties['objectPosition'] + objectPosition?: CSSProperties['objectPosition'], + styles?: React.CSSProperties } -export function Image({ data, alt, objectFit = 'cover', objectPosition = 'center' }: ImageProps) { +export function Image({ data, alt, objectFit = 'cover', objectPosition = 'center', styles }: ImageProps) { if (!data) { console.warn('No image data') return null } if (data.extension === 'svg') { - return {alt + return {alt } const image = getImage(data) if (image) { - return + return } return null diff --git a/src/components/partner-list/index.tsx b/src/components/partner-list/index.tsx index 9ff35e98..92996ab4 100644 --- a/src/components/partner-list/index.tsx +++ b/src/components/partner-list/index.tsx @@ -31,7 +31,7 @@ export function PartnerList({ partners }: PartnerListProps) { {partners.map(({ image, alt }, index) => (
  • - +
  • ))}
    @@ -39,7 +39,7 @@ export function PartnerList({ partners }: PartnerListProps) { {isOverflow && ( {partners.map(({ image, alt }, index) => ( - + ))} )}