Skip to content

Commit

Permalink
Events tweaks (#6356)
Browse files Browse the repository at this point in the history
Co-authored-by: Claudio W <[email protected]>
  • Loading branch information
bmuenzenmeyer and ovflowd authored Feb 29, 2024
1 parent 8ad8886 commit af0c007
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import type { CalendarEvent } from '@/types';

import styles from './calendar.module.css';

type GrouppedEntries = Record<string, Array<CalendarEvent>>;
type GroupedEntries = Record<string, Array<CalendarEvent>>;

const UpcomingEvents: FC = async () => {
const UpcomingMeetings: FC = async () => {
const events = await getCalendarEvents(CALENDAR_NODEJS_ID);

const groupedEntries = events.filter(getZoomLink).reduce((acc, event) => {
Expand All @@ -25,7 +25,7 @@ const UpcomingEvents: FC = async () => {
acc[datePerDay].push(event);

return acc;
}, {} as GrouppedEntries);
}, {} as GroupedEntries);

const sortedGroupedEntries = Object.entries(groupedEntries).sort(
([dateA], [dateB]) => new Date(dateA).getTime() - new Date(dateB).getTime()
Expand All @@ -51,4 +51,4 @@ const UpcomingEvents: FC = async () => {
));
};

export default UpcomingEvents;
export default UpcomingMeetings;
38 changes: 0 additions & 38 deletions components/MDX/Calendar/UpcomingSummits.tsx

This file was deleted.

9 changes: 3 additions & 6 deletions next.mdx.use.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import VerifyingBinariesLink from './components/Downloads/Release/VerifyingBinar
import VersionDropdown from './components/Downloads/Release/VersionDropdown';
import HomeDownloadButton from './components/Home/HomeDownloadButton';
import Link from './components/Link';
import UpcomingEvents from './components/MDX/Calendar/UpcomingEvents';
import UpcomingSummits from './components/MDX/Calendar/UpcomingSummits';
import UpcomingMeetings from './components/MDX/Calendar/UpcomingMeetings';
import MDXCodeBox from './components/MDX/CodeBox';
import MDXCodeTabs from './components/MDX/CodeTabs';
import SearchPage from './components/MDX/SearchPage';
Expand Down Expand Up @@ -56,10 +55,8 @@ export const mdxComponents = {
Button: Button,
// Renders a Search Page
SearchPage: SearchPage,
// Renders an container for Upcoming Node.js Summits
UpcomingSummits: UpcomingSummits,
// Renders an container for Upcoming Node.js Events
UpcomingEvents: UpcomingEvents,
// Renders an container for Upcoming Node.js Meetings
UpcomingMeetings: UpcomingMeetings,
// Links with External Arrow
LinkWithArrow: LinkWithArrow,
// Group of components that enable you to select versions for Node.js
Expand Down
18 changes: 5 additions & 13 deletions pages/en/about/get-involved/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,14 @@ title: Upcoming Events
layout: about.hbs
---

## Upcoming Node.js® Summits
## Upcoming Events

Interested in joining a [Collaborator Summit](/about/get-involved/collab-summit) hosted by the Node.js project?
Check out the list below to find upcoming events.
Node.js events are open and available to the public. Anyone is welcome to join and participate.

Browse [previous Collaborator Summits & Events](/blog/events/) hosted by Node.js.

<UpcomingSummits />

---

## Upcoming Node.js® Events
### Upcoming Node.js® Meetings

The Node.js project holds numerous meetings throughout the year to discuss and plan aspects of the project.
These meetings are open and available to the public. Anyone is welcome to join and participate.

The following Events are upcoming in the next 7 days.
The following meetings are upcoming in the next 7 days.

<UpcomingEvents />
<UpcomingMeetings />

0 comments on commit af0c007

Please sign in to comment.