24 lines
487 B
TypeScript
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>
|
|
)
|
|
}
|