"use client"; import { useMemo } from 'react'; import dynamic from 'next/dynamic'; import EventCard from '@/components/EventCard'; import { Satellite, Rocket, Moon, Sparkles } from 'lucide-react'; const Starfield = dynamic(() => import('@/components/Starfield'), { ssr: false }); // 1. Define the interface interface MissionControlProps { initialIssPass: Date; } // 2. Accept the prop here export default function MissionControl({ initialIssPass }: MissionControlProps) { const BASE_TIME = 1769610273000; const events = useMemo(() => [ { id: 'iss', // Add an ID to distinguish the ISS card title: "ISS Overhead: Home", date: initialIssPass, // Use the real data from SQLite here! icon: , }, { id: 'moon', title: "Next Lunar Phase: Full", date: new Date(BASE_TIME + 1000 * 60 * 60 * 24 * 3), icon: , }, { id: 'starlink', title: "Starlink Train", date: new Date(BASE_TIME + 1000 * 60 * 45), icon: , }, { id: 'meteor', title: "Meteor Shower", date: new Date(BASE_TIME + 1000 * 60 * 60 * 24 * 10), icon: , } ], [initialIssPass]); // Re-memoize if the pass updates return (

MissionControl

Ground Station // [55.6761° N, 12.5683° E]

{events.map((event) => ( ))}
); }