fix: cancelled

This commit is contained in:
Benno Tielen 2025-02-03 09:07:16 +01:00
parent 8a01370b3b
commit 0c067f238b

View file

@ -11,6 +11,7 @@ import { church } from '@/utils/church'
import { ChurchIcon } from '@/components/ChurchIcon/ChurchIcon' import { ChurchIcon } from '@/components/ChurchIcon/ChurchIcon'
import { Cross } from '@/components/Cross/Cross' import { Cross } from '@/components/Cross/Cross'
import { Testimony } from '@/components/Testimony/Testimony' import { Testimony } from '@/components/Testimony/Testimony'
import { Pill } from '@/components/Pill/Pill'
type WorshipPageProps = { type WorshipPageProps = {
worship: WorshipType worship: WorshipType
@ -21,7 +22,7 @@ export const Worship = ({ worship }: WorshipPageProps) => {
const day = date.toLocaleDateString('de-DE', {weekday: 'long'} ) const day = date.toLocaleDateString('de-DE', {weekday: 'long'} )
const localeDate = useDate(worship.date) const localeDate = useDate(worship.date)
const liturgicalDay = worship.liturgicalDay ? worship.liturgicalDay : liturgicalDayName(worship.date); const liturgicalDay = worship.liturgicalDay ? worship.liturgicalDay : liturgicalDayName(worship.date);
const what = worship.title ? worship.title : transformCategory(worship.type); const what = worship.title ? worship.title : transformCategory(worship.type) + " ";
const time = date.toLocaleTimeString("de-DE", { timeStyle: "short", timeZone: "Europe/Berlin" }); const time = date.toLocaleTimeString("de-DE", { timeStyle: "short", timeZone: "Europe/Berlin" });
return ( return (
@ -35,6 +36,7 @@ export const Worship = ({ worship }: WorshipPageProps) => {
size={'xl'} size={'xl'}
color={'contrast'} color={'contrast'}
align={"center"} align={"center"}
cancelled={worship.cancelled}
/> />
<p className={styles.liturgicalDay}> <p className={styles.liturgicalDay}>
@ -46,6 +48,9 @@ export const Worship = ({ worship }: WorshipPageProps) => {
<EventExcerpt> <EventExcerpt>
<EventExcerptRow label={"Was:"}> <EventExcerptRow label={"Was:"}>
{what} {what}
{ worship.cancelled &&
<Pill schema={"contrast"}>Abgesagt</Pill>
}
</EventExcerptRow> </EventExcerptRow>
<EventExcerptRow label={"Wo:"}> <EventExcerptRow label={"Wo:"}>
{ typeof worship.location == "object" && { typeof worship.location == "object" &&