Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit 13475fa

Browse files
authored
Partner image fix (#258)
* update alt text * misc
1 parent de5699d commit 13475fa

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

frontend/src/Components/Partners/index.tsx

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ const Partners = ({ partnerData }: Props) => {
2020
window.open(partnerFormUrl, '_blank');
2121
}, []);
2222

23-
if (partnerData === null || typeof partnerData === 'undefined') {
24-
return <></>;
25-
}
26-
2723
return (
2824
<Flex flexDir="column" justifyContent="center" pt="5.5rem" pb="5.5rem">
2925
<Heading
@@ -37,26 +33,31 @@ const Partners = ({ partnerData }: Props) => {
3733
Our Partners
3834
</Heading>
3935
<Flex flexDir={{ base: 'column', xl: 'row' }} alignItems={'center'}>
40-
{partnerData?.map((item: any, index: number) => {
41-
return (
42-
<Link
43-
href={item.attributes.website}
44-
key={index}
45-
mb={{ base: '4rem', xl: '0' }}
46-
mr={{ base: '0', xl: '6rem' }}
47-
target="_blank"
48-
>
49-
<Image
50-
src={
51-
colorMode === 'dark'
52-
? `${process.env.NEXT_PUBLIC_CMS_URL}${item.attributes.logo_dark.data.attributes.url}`
53-
: `${process.env.NEXT_PUBLIC_CMS_URL}${item.attributes.logo_light.data.attributes.url}`
54-
}
55-
alt="third web"
56-
/>
57-
</Link>
58-
);
59-
})}
36+
{console.log(partnerData)}
37+
{partnerData ? (
38+
partnerData?.map((item: any, index: number) => {
39+
return (
40+
<Link
41+
href={item.attributes.website}
42+
key={index}
43+
mb={{ base: '4rem', xl: '0' }}
44+
mr={{ base: '0', xl: '6rem' }}
45+
target="_blank"
46+
>
47+
<Image
48+
src={
49+
colorMode === 'dark'
50+
? `${process.env.NEXT_PUBLIC_CMS_URL}${item.attributes.logo_dark.data?.attributes.url}`
51+
: `${process.env.NEXT_PUBLIC_CMS_URL}${item.attributes.logo_light.data?.attributes.url}`
52+
}
53+
alt={item.attributes?.name || 'partner image'}
54+
/>
55+
</Link>
56+
);
57+
})
58+
) : (
59+
<></>
60+
)}
6061
</Flex>
6162
<Button
6263
backgroundColor={colorMode === 'dark' ? 'white' : 'black'}

0 commit comments

Comments
 (0)