Skip to content

Commit 745f5cc

Browse files
committed
add sponsors grid
1 parent 46af26e commit 745f5cc

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

src/components/sponsors.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ import {
66
UnorderedList,
77
ListItem,
88
Link,
9+
SimpleGrid,
10+
Flex,
911
} from '@chakra-ui/react'
1012
import React from 'react'
13+
import { Sponsors as data } from '@/data/sponsors'
1114

1215
import { Heading } from '@/components/mdx'
1316

@@ -135,6 +138,7 @@ const FundingSources = () => {
135138
}
136139

137140
export const Sponsors = () => {
141+
const sponsors = React.useMemo(() => data, [])
138142
return (
139143
<Box id={'sponsors'} as='section'>
140144
<Container maxW='container.lg' centerContent>
@@ -149,6 +153,29 @@ export const Sponsors = () => {
149153
</Text>
150154
<Image src={'funderlogos.png'} alt={'Collage of funder logos.'} />
151155

156+
<SimpleGrid
157+
columns={{ base: 1, sm: 2, md: 2, lg: 4 }}
158+
my={4}
159+
spacing={'space-between'}
160+
align={'center'}
161+
justify={'center'}
162+
>
163+
{sponsors.map((sponsor, index) => (
164+
<Flex
165+
as={Link}
166+
href={sponsor.url}
167+
key={index}
168+
w={64}
169+
h={64}
170+
align={'center'}
171+
justify={'center'}
172+
rounded={'full'}
173+
>
174+
<Image w={36} h={36} src={sponsor.logo} alt={sponsor.name} />
175+
</Flex>
176+
))}
177+
</SimpleGrid>
178+
152179
<FundingSources />
153180
</Box>
154181
</Container>

src/data/sponsors.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export const Sponsors = [
2+
{
3+
name: 'Parcels',
4+
logo: '/parcels-assets/logo-horo.svg',
5+
url: 'https://www.example.com/',
6+
},
7+
{
8+
name: 'Parcels',
9+
logo: '/parcels-assets/logo-horo.svg',
10+
url: 'https://www.example.com/',
11+
}, // TODO: Update
12+
]

0 commit comments

Comments
 (0)