Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
55aa6af239 | |||
922a8d24dd | |||
7192f527e9 |
@ -95,6 +95,10 @@ export default function Club() {
|
|||||||
<TableLeftHeading>Leslie Brown</TableLeftHeading>
|
<TableLeftHeading>Leslie Brown</TableLeftHeading>
|
||||||
<TableCell>Director</TableCell>
|
<TableCell>Director</TableCell>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<TableLeftHeading>Linn Hulley</TableLeftHeading>
|
||||||
|
<TableCell>Director</TableCell>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -131,7 +131,7 @@ export const CalendarComponent: React.FC<{ calendar: Calendar }> = ({ calendar }
|
|||||||
</header>
|
</header>
|
||||||
<div className="shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col">
|
<div className="shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col">
|
||||||
<div className="grid grid-cols-7 gap-px border-b border-zinc-100 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none">
|
<div className="grid grid-cols-7 gap-px border-b border-zinc-100 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none">
|
||||||
{[['M', 'on'], ['T', 'ue'], ['W', 'ed'], ['T', 'hu'], ['F', 'ri'], ['S', 'at'], ['S', 'un']].map((d) => (
|
{[['S', 'un'], ['M', 'on'], ['T', 'ue'], ['W', 'ed'], ['T', 'hu'], ['F', 'ri'], ['S', 'at']].map((d) => (
|
||||||
<div key={d[0] + d[1]} className="bg-white py-2">
|
<div key={d[0] + d[1]} className="bg-white py-2">
|
||||||
{d[0]}<span className="sr-only sm:not-sr-only">{d[1]}</span>
|
{d[0]}<span className="sr-only sm:not-sr-only">{d[1]}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,7 +44,13 @@ async function loadCalendar(): Promise<void> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const icalContents = await (await fetch(icalAddr)).text();
|
console.log("Refreshing iCal from Google Calendar")
|
||||||
|
|
||||||
|
// For some reason Google Calendar is sending different content based on who is requesting it.
|
||||||
|
const headers = new Headers();
|
||||||
|
headers.set('User-Agent', 'curl/7.54.1');
|
||||||
|
|
||||||
|
const icalContents = await (await fetch(icalAddr, { headers })).text();
|
||||||
const events = ical.parseICS(icalContents);
|
const events = ical.parseICS(icalContents);
|
||||||
const thisMonth = dayjs().startOf('month');
|
const thisMonth = dayjs().startOf('month');
|
||||||
const yesterday = dayjs().startOf('day').subtract(1, 'day');
|
const yesterday = dayjs().startOf('day').subtract(1, 'day');
|
||||||
|
Reference in New Issue
Block a user