Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new event with link #6816

Merged
merged 1 commit into from Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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