feat(SW-350): Update design for booking widget
This commit is contained in:
@@ -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} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user