diff --git a/app/evaluation/[days]/[...ical-link]/page.tsx b/app/evaluation/[days]/[...ical-link]/page.tsx
index 1f5ff79..e717b0c 100644
--- a/app/evaluation/[days]/[...ical-link]/page.tsx
+++ b/app/evaluation/[days]/[...ical-link]/page.tsx
@@ -1,5 +1,5 @@
import ical, { VEvent } from 'node-ical';
-import CategoryChart from '@/components/CategoryChart'; // <-- Importieren
+import CategoryChart from '@/components/CategoryChart';
interface PageProps {
params: Promise<{
@@ -45,7 +45,11 @@ export default async function EvaluationPage({ params }: PageProps) {
const response = await fetch(icalUrl, { next: { revalidate: 3600 } });
if (!response.ok) {
- return
Fehler beim Laden der Kalenderdaten. Status: {response.status}
;
+ return (
+
+ Fehler beim Laden der Kalenderdaten. Status: {response.status}
+
+ );
}
const icalData = await response.text();
@@ -78,51 +82,63 @@ export default async function EvaluationPage({ params }: PageProps) {
});
return (
-
+
- Gesamtdauer pro Kategorie
+ Gesamtdauer pro Kategorie
{Object.keys(times).length === 0 ? (
Keine Zeiten erfasst.
) : (
<>
-
-
-
- | Kategorie |
- Dauer |
- Anteil |
-
-
-
- {Object.entries(times).map(([category, minutes]) => (
-
- | {category} |
-
- {Math.floor(minutes / 60)} Std. {Math.round(minutes % 60)} Min. ({Math.round(minutes)} Min. gesamt)
- |
-
- {total > 0 ? Math.round((minutes / total) * 1000) / 10 : 0}%
- |
+ {/* Responsive Container für die Tabelle */}
+
+
+
+
+ | Kategorie |
+ Dauer |
+ Anteil |
- ))}
-
-
-
- | Total |
-
- {Math.floor(total / 60)} Std. {Math.round(total % 60)} Min. ({Math.round(total)} Min. gesamt)
- |
- 100% |
-
-
-
+
+
+ {Object.entries(times).map(([category, minutes]) => (
+
+ | {category} |
+
+ {Math.floor(minutes / 60)} Std. {Math.round(minutes % 60)} Min. ({Math.round(minutes)} Min. gesamt)
+ |
+
+ {total > 0 ? Math.round((minutes / total) * 1000) / 10 : 0}%
+ |
+
+ ))}
+
+
+
+ | Total |
+
+ {Math.floor(total / 60)} Std. {Math.round(total % 60)} Min. ({Math.round(total)} Min. gesamt)
+ |
+ 100% |
+
+
+
+
>
)}
- Termine ({events.length})
+ Termine ({events.length})
{events.length === 0 ? (
Keine Termine gefunden.
) : (
@@ -132,27 +148,51 @@ export default async function EvaluationPage({ params }: PageProps) {
const endDate = getIcalDate(event.end);
return (
-
- {getIcalText(event.summary)}
-
+
+ {getIcalText(event.summary)}
+
Start: {startDate.toLocaleString('de-DE')}
Ende: {endDate.toLocaleString('de-DE')}
- {event.location && Ort: {getIcalText(event.location)}
}
- {event.description && Beschreibung: {getIcalText(event.description)}
}
+ {event.location && (
+
+ Ort: {getIcalText(event.location)}
+
+ )}
+ {event.description && (
+
+ Beschreibung: {getIcalText(event.description)}
+
+ )}
{event.categories && (
-
+
Kategorien:
{getCategories(event.categories).map((cat, i) => (