import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { getAllDays, getAllLines } from "@/db";
interface HomePageProps {
searchParams: Promise<{ message?: string }>;
}
export default async function Home({ searchParams }: HomePageProps) {
const lines = await getAllLines();
const days = await getAllDays();
const message = (await searchParams).message;
console.log("Message from searchParams:", message);
return (
{message && (
Refetch all data - Response
{message}
)}
Linie
{lines.map((line) => (
-
{line.name}
{line.description}
))}
);
}