-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): add embedded cuhacking calendar
- Loading branch information
1 parent
65bb977
commit 5bee7af
Showing
2 changed files
with
45 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
'use client' | ||
|
||
import FullCalendar from '@fullcalendar/react' | ||
import dayGridPlugin from '@fullcalendar/daygrid' | ||
import timeGridPlugin from '@fullcalendar/timegrid' | ||
import listPlugin from '@fullcalendar/list' | ||
import googleCalendarPlugin from '@fullcalendar/google-calendar' | ||
|
||
// cuHacking calendar | ||
const GOOGLE_CALENDAR_ID = 'fcdba3f354d4e01552e2495d743105bd9efce4e1076cda3c1ec1454d0f5faa73@group.calendar.google.com' | ||
|
||
// temporary, add as an env variable later | ||
// google calendar api key | ||
const API_KEY = '' | ||
|
||
export default function Calendar() { | ||
return ( | ||
<FullCalendar | ||
plugins={[dayGridPlugin, timeGridPlugin, listPlugin, googleCalendarPlugin]} | ||
googleCalendarApiKey={API_KEY} | ||
events={{ | ||
googleCalendarId: GOOGLE_CALENDAR_ID, | ||
}} | ||
initialView="timeGridWeek" | ||
headerToolbar={{ | ||
left: 'today prev,next', | ||
center: 'title', | ||
right: 'timeGridWeek listWeek dayGridMonth', | ||
}} | ||
views={{ | ||
timeGridWeek: { | ||
slotMinTime: '06:00:00', | ||
slotMaxTime: '24:00:00', | ||
scrollTime: '17:00:00', | ||
}, | ||
dayGridMonth: {}, | ||
listWeek: {}, | ||
}} | ||
/> | ||
) | ||
} |
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