Files
web/components/BookingWidget/index.tsx
2024-09-24 09:47:31 +02:00

24 lines
487 B
TypeScript

import { getLocations } from "@/lib/trpc/memoizedRequests"
import Form from "@/components/Forms/BookingWidget"
import styles from "./bookingWidget.module.css"
export function preload() {
void getLocations()
}
export default async function BookingWidget() {
const locations = await getLocations()
if (!locations || "error" in locations) {
return null
}
return (
<section className={styles.container}>
<Form locations={locations.data} />
</section>
)
}