-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from MichiganDataScienceTeam/56-add-calendar-page
56 add calendar page
- Loading branch information
Showing
8 changed files
with
156 additions
and
34 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
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
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
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 |
---|---|---|
|
@@ -29,5 +29,10 @@ | |
"name": "Email", | ||
"href": "mailto:[email protected]", | ||
"icon_name": "envelope" | ||
}, | ||
{ | ||
"name": "Calendar", | ||
"href": "https://calendar.google.com/calendar/u/0?cid=Y18yMmNhMGMxNTE1ODU3NjA0NDJjYWQ1Nzk2ZmI5MWJkMThiN2RiMTFkODEzZTkxNDNlMzg1NDlhYWRjZTY1YWZlQGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20", | ||
"icon_name": "calendar" | ||
} | ||
] | ||
] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,9 +1,43 @@ | ||
import Layout from "@/components/layout"; | ||
import Hero from "@/components/hero"; | ||
export default function calendar({ content }) { | ||
import FullCalendar from '@fullcalendar/react' | ||
import listPlugin from '@fullcalendar/list'; | ||
import googleCalendarPlugin from '@fullcalendar/google-calendar'; | ||
import Button from "@/components/button"; | ||
import loadStaticData from "@/shared/static"; | ||
import HeadContent from "@/components/headContent"; | ||
export default function CalendarPage({ calendarLink }) { | ||
|
||
return ( | ||
<Layout> | ||
<HeadContent | ||
title={"Michigan Data Science Team - Calendar"} | ||
description={ | ||
"Here is a calendar of all of the Michigan Data Science Team events!" | ||
} | ||
/> | ||
<Hero title="Calendar" /> | ||
<div className="mx-auto container p-2"> | ||
|
||
<div className="mb-4"><Button className='mb-4' href={calendarLink} text={"Add to Google Calendar"} /></div> | ||
<FullCalendar | ||
plugins={[listPlugin, googleCalendarPlugin]} | ||
initialView="listMonth" | ||
googleCalendarApiKey="AIzaSyDsoaZFzbHcCD7m6rhelWdsWS_AjLJQCko" | ||
events={{ | ||
googleCalendarId: 'c_22ca0c151585760442cad5796fb91bd18b7db11d813e9143e38549aadce65afe@group.calendar.google.com', | ||
}} | ||
/> | ||
</div> | ||
|
||
</Layout> | ||
); | ||
} | ||
|
||
|
||
export async function getStaticProps() { | ||
const data = loadStaticData("links.json"); | ||
let calendarLink = data.find(obj => obj.name === "Calendar")?.href || "" | ||
|
||
return { props: { calendarLink } }; | ||
} |
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