Skip to content

Commit

Permalink
feat(docs): add embedded cuhacking calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
AquaShotRyan committed Aug 31, 2024
1 parent 65bb977 commit 5bee7af
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
41 changes: 41 additions & 0 deletions apps/docs/src/components/Calendar.tsx
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: {},
}}
/>
)
}
4 changes: 4 additions & 0 deletions apps/docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ description: Leave none behind regardless of our development cost.

import { pages } from "../../app/docs/source";

import Calendar from "../../components/Calendar.tsx";

<Calendar/>

<Callout type="warn">
This is our highest priority project. No questions asked. All other projects
are secondary to keeping our docs up-to-date.
Expand Down

0 comments on commit 5bee7af

Please sign in to comment.