Uhrzeit fix

This commit is contained in:
2025-10-08 12:07:56 +02:00
parent e378ce4a97
commit 495bfe71a3
14 changed files with 176 additions and 165 deletions

View File

@@ -1,7 +1,7 @@
import React from 'react'
import { Link } from 'react-router-dom'
const apiBaseUrl = (import.meta.env.VITE_API_BASE_URL || 'http://localhost:4001').replace(/\/$/, '')
const apiBaseUrl = (import.meta.env.VITE_API_BASE_URL || '').replace(/\/$/, '')
function resolveEventImage(value, fallback) {
if (typeof value === 'string') {
@@ -20,10 +20,10 @@ function resolveEventImage(value, fallback) {
}
export function EventCard({ e }) {
const dt = new Date(e.date)
const dt = new Date(e.date + 'T00:00:00')
const hasValidDate = !Number.isNaN(dt)
const mon = hasValidDate ? dt.toLocaleString('en', { month: 'short' }) : ''
const day = hasValidDate ? dt.getDate() : ''
const mon = hasValidDate ? dt.toLocaleString('en', { month: 'short', timeZone: 'America/Chicago' }) : ''
const day = hasValidDate ? new Intl.DateTimeFormat('en', { day: 'numeric', timeZone: 'America/Chicago' }).format(dt) : ''
const details = [e.time, e.location].filter(Boolean).join(' | ')
@@ -162,7 +162,7 @@ export function SermonCard({ s }) {
</div>
<div>
<h3 className="font-heading text-h3">{s.title}</h3>
<div className="text-muted text-small mt-2">{s.speaker} | {new Date(s.date).toLocaleDateString()}</div>
<div className="text-muted text-small mt-2">{s.speaker} | {new Date(s.date + 'T00:00:00').toLocaleDateString('en-US', { timeZone: 'America/Chicago' })}</div>
</div>
</div>
<p className="mt-6 text-body mb-8">{s.summary}</p>

View File

@@ -53,7 +53,7 @@ export function TextHero() {
<LazyImage
src="/assets/hero_golden_hour.png"
alt="Annaville SDA Church building during golden hour with people walking on the path"
className="w-full h-[400px] object-cover rounded-lg shadow-lg"
className="w-full h-[600px] object-cover rounded-lg shadow-lg"
/>
</div>
</div>