feat: update ProjectE application

This commit is contained in:
2026-07-18 19:05:52 -04:00
parent 8f55626e03
commit 4c1cc50231
68 changed files with 1586 additions and 697 deletions
@@ -4,6 +4,7 @@ import { Calendar, dateFnsLocalizer } from 'react-big-calendar';
import 'react-big-calendar/lib/css/react-big-calendar.css';
import { format, parse, startOfWeek, getDay } from 'date-fns';
import { enUS } from 'date-fns/locale/en-US';
import { useRouter } from 'next/navigation';
const locales = {
'en-US': enUS,
@@ -22,9 +23,10 @@ interface CalendarEvent {
title: string;
start: Date;
end: Date;
type: 'task' | 'habit' | 'project' | 'milestone';
type: 'task' | 'project' | 'milestone';
domain: string;
color: string;
href: string;
}
interface BigCalendarWrapperProps {
@@ -44,11 +46,9 @@ function eventStyleGetter(event: CalendarEvent) {
};
}
function handleSelectEvent(event: CalendarEvent) {
console.log('Selected event:', event);
}
export function BigCalendarWrapper({ events }: BigCalendarWrapperProps) {
const router = useRouter();
return (
<Calendar
localizer={localizer}
@@ -57,7 +57,7 @@ export function BigCalendarWrapper({ events }: BigCalendarWrapperProps) {
endAccessor="end"
style={{ height: 600 }}
eventPropGetter={eventStyleGetter}
onSelectEvent={handleSelectEvent}
onSelectEvent={(event) => router.push(event.href)}
views={['month', 'week', 'day']}
defaultView="month"
popup