Merged in feat/refactor-header-footer-sitewidealert (pull request #1374)
Refactor: removed parallel routes for header, footer and sidewidealert. Langswitcher and sidewidealert now client components * feat - removed parallel routes and made sidepeek and sitewidealerts as client components * Langswitcher as client component * Fixed lang switcher for current header * Passing lang when fetching siteconfig * Merge branch 'master' into feat/refactor-header-footer-sitewidealert * Refactor * Removed dead code * Show only languages that has translation * Refetch sitewidealert every 60 seconds * Merge branch 'master' into feat/refactor-header-footer-sitewidealert * Removed sidepeek parallel route from my-stay * Added missing env.var to env.test * Removed console.log Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { getLocations, getSiteConfig } from "@/lib/trpc/memoizedRequests"
|
||||
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import BookingWidgetClient from "./Client"
|
||||
|
||||
import type { BookingWidgetProps } from "@/types/components/bookingWidget"
|
||||
@@ -12,8 +14,9 @@ export default async function BookingWidget({
|
||||
type,
|
||||
bookingWidgetSearchParams,
|
||||
}: BookingWidgetProps) {
|
||||
const lang = await getLang()
|
||||
const locations = await getLocations()
|
||||
const siteConfig = await getSiteConfig()
|
||||
const siteConfig = await getSiteConfig(lang)
|
||||
|
||||
if (!locations || "error" in locations || siteConfig?.bookingWidgetDisabled) {
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user