mobile app phase 1

This commit is contained in:
2026-05-10 21:19:39 +02:00
parent 442a00dbbe
commit d08afc1dcb
1679 changed files with 392410 additions and 3005 deletions
+31
View File
@@ -0,0 +1,31 @@
"use client";
import { useEventsStore } from "@/hooks/useEventsStore";
import { useOriginStation } from "@/hooks/useOriginStation";
import EventCard from "@/app/event/EventCard";
export default function Home() {
const { events } = useEventsStore();
const { station: originStation } = useOriginStation();
const upcoming = events
.filter((e) => e.eventTime >= new Date())
.sort((a, b) => a.eventTime.getTime() - b.eventTime.getTime());
return (
<main className="max-w-3xl mx-auto w-full px-4 py-6">
{upcoming.length === 0 ? (
<div className="text-center py-16 text-gray-500 dark:text-gray-400">
<p className="text-lg font-medium">No upcoming events</p>
<p className="text-sm mt-1">Use &quot;Add Event&quot; to add one, or import from the Calendar.</p>
</div>
) : (
<div className="space-y-4">
{upcoming.map((event) => (
<EventCard key={event.id} event={event} originStation={originStation} />
))}
</div>
)}
</main>
);
}