date updates

This commit is contained in:
2024-06-19 15:24:29 -04:00
parent 21b5440e48
commit 083ae4df65
3 changed files with 36 additions and 19 deletions
+9 -1
View File
@@ -6,6 +6,8 @@ import {
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { getEvents } from "@/db/db_calls";
import { addDays, startOfMonth, startOfWeek } from "date-fns";
import { Metadata } from "next";
import React from "react";
@@ -13,7 +15,13 @@ export const metadata: Metadata = {
title: "Calendar",
};
const page = () => {
const page = async () => {
const startDate = startOfWeek(startOfMonth(new Date("2024-06-19")));
const endDate = addDays(startDate, 41);
const getEventArray = await getEvents(startDate, endDate);
// console.log(getEventArray);
return (
<div className="flex flex-col w-full h-full gap-4">
<div className="grid grid-cols-5 gap-4 h-48">