convert to TS component eventList + context

This commit is contained in:
p2405951
2026-03-12 10:45:52 +01:00
parent 23219d1ffe
commit e259f5f93f
11 changed files with 238 additions and 105 deletions
-3
View File
@@ -1,3 +0,0 @@
import { createContext } from "react";
export const EventContext = createContext(null);
+26
View File
@@ -0,0 +1,26 @@
/*import { createContext } from "react";
export const EventContext = createContext(null);*/
import { createContext } from "react";
export type Task = {
name: string;
description: string;
start: string | Date;
end: string | Date;
};
export type EventGroup = {
date: string;
name: string;
start: string | Date;
tasks: Task[];
};
export type EventContextType = {
events: EventGroup[];
};
export const EventContext = createContext<EventContextType | null>(null);