Skip to content

Commit

Permalink
Add new event with link (#6816)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdorfman committed Mar 15, 2024
1 parent df850c2 commit 6a08951
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/pages/community.tsx
Expand Up @@ -14,6 +14,12 @@ const socialMediaStyles = 'text-xl text-gray-400 hover:text-gray-300 transition-

const events = {
upcoming: [
{
title: 'Learning TypeScript Livestream',
location: 'YouTube',
date: 'Mar 20, 2024',
link: 'https://www.youtube.com/watch?v=CY10cOUAkj4',
},
{
title: 'PyCon',
location: 'Pittsburgh, PA',
Expand Down Expand Up @@ -227,7 +233,15 @@ const Community: FunctionComponent<PostIndexComponentProps> = ({ posts, allPosts
{events.upcoming.map(event => (
<li key={event.title} className="p-[25px]">
<Heading size="h6">{event.date}</Heading>
<Heading size="h4">{event.title}</Heading>
{event.link ? (
<Heading size="h4">
<a href={event.link} target="_blank" rel="noopener noreferrer">
{event.title}
</a>
</Heading>
) : (
<Heading size="h4">{event.title}</Heading>
)}
<p className="mb-0 text-base tracking-[-0.25px]">{event.location}</p>
</li>
))}
Expand Down Expand Up @@ -289,7 +303,7 @@ export const getStaticProps: GetStaticProps<{
allPosts: Post[]
posts: Post[]
}> = async ({ preview = false }) => {
const publishedPosts = await getAllPublishedBlogPosts('guest-post')
const publishedPosts = await getAllPublishedBlogPosts('guest-post')
return {
props: {
allPosts: publishedPosts ?? [],
Expand Down

0 comments on commit 6a08951

Please sign in to comment.