style: support multiple categories
This commit is contained in:
1 parent
811277d149
commit
d74e8b3fcf
1 file changed
+18
-3
@@ -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>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user