feat(SW-350): Update design for booking widget

This commit is contained in:
Pontus Dreij
2024-10-02 15:36:58 +02:00
parent e8027be2e8
commit d58c77493a
19 changed files with 162 additions and 33 deletions

View File

@@ -2,16 +2,22 @@ import { getLocations } from "@/lib/trpc/memoizedRequests"
import BookingWidgetClient from "./Client"
import type { BookingWidgetType } from "@/types/components/bookingWidget"
export function preload() {
void getLocations()
}
export default async function BookingWidget() {
export default async function BookingWidget({
type,
}: {
type: BookingWidgetType
}) {
const locations = await getLocations()
if (!locations || "error" in locations) {
return null
}
return <BookingWidgetClient locations={locations.data} />
return <BookingWidgetClient locations={locations.data} type={type} />
}