style: support multiple categories

This commit is contained in:
robin committed 2026-08-03 18:01:27 +02:00
1 parent 811277d149
commit d74e8b3fcf
1 file changed
+18 -3
+18 -3
View File
@@ -83,8 +83,6 @@ export default async function EvaluationPage({ params }: PageProps) {
return (
<main>
<h1>Meine Kalender-Events</h1>
<section>
<h2>Gesamtdauer pro Kategorie</h2>
{Object.keys(times).length === 0 ? (
@@ -122,7 +120,24 @@ export default async function EvaluationPage({ params }: PageProps) {
<p><strong>Beschreibung:</strong> {getIcalText(event.description)}</p>
)}
{event.categories && (
<p><strong>Kategorien:</strong> {getIcalText(event.categories)}</p>
<div>
<strong>Kategorien: </strong>
{getCategories(event.categories).map((cat, i) => (
<span
key={i}
style={{
display: 'inline-block',
background: "white",
color: "black",
padding: '2px 8px',
borderRadius: '4px',
marginRight: '0.5rem'
}}
>
{cat}
</span>
))}
</div>
)}
</li>
);