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 Events Page #122

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Add Events Page #122

wants to merge 3 commits into from

Conversation

FoggyMtnDrifter
Copy link
Member

This PR adds an events page at /events.

Copy link

vercel bot commented Feb 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rockylinux-org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 26, 2025 7:02am

Copy link
Member

@NebraskaCoder NebraskaCoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few changes and comments when you get time to review them.

Comment on lines +25 to +39
function CalendarIcon({ date, className }: { date: Date; className?: string }) {
return (
<div
className={cn(
"relative flex flex-col items-center justify-center w-12 h-12 rounded border bg-background",
className
)}
>
<div className="text-[0.65rem] font-medium text-muted-foreground">
{date.toLocaleString("default", { month: "short" })}
</div>
<div className="font-bold text-xl leading-none">{date.getDate()}</div>
</div>
);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we extract this to its own file? It helps keep separation of concerns and allows it to be reused. If you don't want it to be reused, you can keep it in the same directory.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may re-work this tomorrow following the conversation with Wale in Mattermost earlier. But yes, I agree that this could be used elsewhere in the future so it would make sense to separate it into its own component. Will do!

);
}

export default function Component() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename Component to EventList so we don't cause confusion during debugging and stack traces?

Suggested change
export default function Component() {
export default function EventList() {

Comment on lines +81 to +84
<Link
key={index}
href={event.link}
>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use passHref here so we don't have an extra DOM element.

Suggested change
<Link
key={index}
href={event.link}
>
<Link
key={index}
href={event.link}
passHref
>

className="w-full mt-4"
onClick={() => setDisplayCount((prev) => prev + 10)}
>
Load More
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we translating this? If so, it can be passed in as a prop. If not, then you can close this review comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants