mirror of
https://github.com/dylanbenzi/yellowbird.git
synced 2026-11-27 01:07:01 +00:00
date updates
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user