Skip to content

Commit 59ee0cf

Browse files
committed
fix spacing on event groups and sort them
1 parent 86b6877 commit 59ee0cf

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/pages/groups/index.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import {Box, Heading} from "@codeday/topo/Atom";
2+
import {Grid, Heading} from "@codeday/topo/Atom";
33
import {getSession} from 'next-auth/react';
44
import EventGroup from '../../components/EventGroup';
55
import {getEventGroups} from './index.gql';
@@ -15,11 +15,11 @@ export default function Groups({groups}) {
1515
Event Groups
1616
<CreateEventGroupModal />
1717
</Heading>
18-
<Box display="flex">
19-
{groups.map((group) => (
20-
<EventGroup m={4} group={group}/>
18+
<Grid templateColumns={{base: '1fr', md: 'repeat(2, 1fr)', lg: 'repeat(3, 1fr)'}} gap={4}>
19+
{groups.sort((a, b) => new Date(b.startDate) - new Date(a.startDate)).map((group) => (
20+
<EventGroup key={group.id} group={group}/>
2121
))}
22-
</Box>
22+
</Grid>
2323
</Page>
2424

2525
);

0 commit comments

Comments
 (0)