feat: improve structure and error handling

This commit is contained in:
Michael Zetterberg
2024-05-14 15:55:46 +02:00
parent 01587d7fd5
commit f5108d1a8e
104 changed files with 1505 additions and 1570 deletions

View File

@@ -2,11 +2,9 @@ import "@/app/globals.css"
import "@scandic-hotels/design-system/style.css"
import Script from "next/script"
import { SessionProvider } from "next-auth/react"
import TrpcProvider from "@/lib/trpc/Provider"
import { auth } from "@/auth"
import AdobeScript from "@/components/Current/AdobeScript"
import VwoScript from "@/components/Current/VwoScript"
@@ -23,7 +21,6 @@ export default async function RootLayout({
children,
params,
}: React.PropsWithChildren<LayoutArgs<LangParams>>) {
const session = await auth()
return (
<html lang={params.lang}>
<head>
@@ -46,9 +43,7 @@ export default async function RootLayout({
<VwoScript />
</head>
<body>
<SessionProvider basePath="/api/web/auth" session={session}>
<TrpcProvider>{children}</TrpcProvider>
</SessionProvider>
<TrpcProvider>{children}</TrpcProvider>
<Script id="page-tracking">{`
typeof _satellite !== "undefined" && _satellite.pageBottom();
`}</Script>