Merged in feat/sw-3610-basicProfile (pull request #3144)
Feat(SW-3610): basic profile endpoint on protected layouts * Basic profile in protected layouts * . Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -6,7 +6,7 @@ import { redirect } from "next/navigation"
|
||||
import { logger } from "@scandic-hotels/common/logger"
|
||||
import { safeTry } from "@scandic-hotels/common/utils/safeTry"
|
||||
|
||||
import { getProfile } from "@/lib/trpc/memoizedRequests"
|
||||
import { getBasicProfile } from "@/lib/trpc/memoizedRequests"
|
||||
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
@@ -15,7 +15,7 @@ export default async function Layout(props: LayoutProps<"/[lang]/webview">) {
|
||||
|
||||
const { children } = props
|
||||
const intl = await getIntl()
|
||||
const [user, error] = await safeTry(getProfile())
|
||||
const [user, error] = await safeTry(getBasicProfile())
|
||||
|
||||
if (!user && !error) {
|
||||
logger.debug(`[webview:page] unable to load user`)
|
||||
|
||||
Reference in New Issue
Block a user