Merged in chore/hardcode-lang-in-sas (pull request #2612)
temp: Hardcode lang param * Hardcode lang param Approved-by: Linus Flood
This commit is contained in:
@@ -30,12 +30,13 @@ type RootLayoutProps = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default async function RootLayout(props: RootLayoutProps) {
|
export default async function RootLayout(props: RootLayoutProps) {
|
||||||
const params = await props.params
|
// const params = await props.params
|
||||||
|
const lang = Lang.en //params.lang
|
||||||
|
|
||||||
const { children } = props
|
const { children } = props
|
||||||
|
|
||||||
setLang(params.lang)
|
setLang(lang)
|
||||||
const messages = await getMessages(params.lang)
|
const messages = await getMessages(lang)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@@ -44,7 +45,7 @@ export default async function RootLayout(props: RootLayoutProps) {
|
|||||||
<div className="root">
|
<div className="root">
|
||||||
<ClientIntlProvider
|
<ClientIntlProvider
|
||||||
defaultLocale={Lang.en}
|
defaultLocale={Lang.en}
|
||||||
locale={params.lang}
|
locale={lang}
|
||||||
messages={messages}
|
messages={messages}
|
||||||
>
|
>
|
||||||
{/* TODO handle onError */}
|
{/* TODO handle onError */}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { serializeBookingSearchParams } from "@scandic-hotels/booking-flow/utils
|
|||||||
import { ChildBedMapEnum } from "@scandic-hotels/trpc/enums/childBedMapEnum"
|
import { ChildBedMapEnum } from "@scandic-hotels/trpc/enums/childBedMapEnum"
|
||||||
|
|
||||||
test("can make a search with city", async ({ page }) => {
|
test("can make a search with city", async ({ page }) => {
|
||||||
await page.goto("/")
|
await page.goto("/en")
|
||||||
|
|
||||||
// Search for city
|
// Search for city
|
||||||
const combobox = page.getByRole("combobox", { name: /where to/i })
|
const combobox = page.getByRole("combobox", { name: /where to/i })
|
||||||
@@ -99,7 +99,7 @@ test("can make a search with city", async ({ page }) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test("can make a search with hotel", async ({ page }) => {
|
test("can make a search with hotel", async ({ page }) => {
|
||||||
await page.goto("/")
|
await page.goto("/en")
|
||||||
|
|
||||||
// Search for hotel
|
// Search for hotel
|
||||||
const combobox = page.getByRole("combobox", { name: /where to/i })
|
const combobox = page.getByRole("combobox", { name: /where to/i })
|
||||||
|
|||||||
Reference in New Issue
Block a user