-
-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/markdown-files
- Loading branch information
Showing
14 changed files
with
618 additions
and
363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import React, { useState } from 'react'; | ||
|
||
import EventFilter from '@/components/navigation/EventFilter'; | ||
import EventPostItem from '@/components/navigation/EventPostItem'; | ||
import Heading from '@/components/typography/Heading'; | ||
import Paragraph from '@/components/typography/Paragraph'; | ||
import meetings from '@/config/meetings.json'; | ||
import type { Event } from '@/types/pages/community/Community'; | ||
import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading'; | ||
import { ParagraphTypeStyle } from '@/types/typography/Paragraph'; | ||
import { getEvents } from '@/utils/staticHelpers'; | ||
|
||
/** | ||
* CommunityEvents component for displaying all events | ||
*/ | ||
const CommunityEvents = () => { | ||
const [events, setEvents] = useState(getEvents(meetings)); | ||
|
||
return ( | ||
<div className='mt-20'> | ||
<div className='items-center justify-between sm:flex'> | ||
<Heading level={HeadingLevel.h2} typeStyle={HeadingTypeStyle.md}> | ||
All Events | ||
</Heading> | ||
<div className='mt-5 sm:mt-0'> | ||
<EventFilter data={meetings} setData={setEvents} /> | ||
</div> | ||
</div> | ||
<div className='mt-10'> | ||
{!events || events.length === 0 ? ( | ||
<div className='flex content-center justify-center'> | ||
<Paragraph typeStyle={ParagraphTypeStyle.md} className='mx-auto mt-5 max-w-2xl'> | ||
No Events. Check back later! | ||
</Paragraph> | ||
</div> | ||
) : ( | ||
<ul className='grid grid-cols-1 gap-5 md:grid-cols-2 lg:grid-cols-3'> | ||
{events.map((event: Event, index: number) => { | ||
return <EventPostItem key={index} id={event.title} post={event} />; | ||
})} | ||
</ul> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CommunityEvents; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.