|
|
@@ -68,6 +68,9 @@ export default async function RootLayout({
|
|
|
}
|
|
|
|
|
|
const cookieStore = await cookies();
|
|
|
+ ////////eruda调试/////////
|
|
|
+ const loadEruda = cookieStore.get('9527_LOAD_ERUDA_3345678');
|
|
|
+ ////////eruda调试////////
|
|
|
const currentCurrency = cookieStore.get(CURRENT_CURRENCY);
|
|
|
const currentLocale = cookieStore.get(CURRENT_LOCAL);
|
|
|
const currentChannel = cookieStore.get(CURRENT_CHANNEL);
|
|
|
@@ -85,10 +88,16 @@ export default async function RootLayout({
|
|
|
const {data: countryResData} = await serverGraphqlFetch<{
|
|
|
countries: Country[]
|
|
|
}>({
|
|
|
- query: GET_COUNTRIES
|
|
|
+ query: GET_COUNTRIES,
|
|
|
+ cache: 'force-cache',
|
|
|
+ revalidate: 3600,
|
|
|
+ tags: ["config-country-list"]
|
|
|
});
|
|
|
const {data: currencyResData} = await serverGraphqlFetch<CurrenciesData>({
|
|
|
- query: GET_CURRENCIES
|
|
|
+ query: GET_CURRENCIES,
|
|
|
+ cache: 'force-cache',
|
|
|
+ revalidate: 3600,
|
|
|
+ tags: ["config-currency-list"]
|
|
|
});
|
|
|
|
|
|
const countries = countryResData.countries;
|
|
|
@@ -106,8 +115,7 @@ export default async function RootLayout({
|
|
|
};
|
|
|
|
|
|
const {data: cartDetailsRes} = await serverGraphqlFetch<GetCartItemData>({
|
|
|
- query: GET_CART_ITEM,
|
|
|
- operationName:'GetCartItem'
|
|
|
+ query: GET_CART_ITEM
|
|
|
});
|
|
|
|
|
|
const cartDetails = cartDetailsRes.createReadCart?.readCart ?? null;
|
|
|
@@ -115,7 +123,7 @@ export default async function RootLayout({
|
|
|
<html lang="en" suppressHydrationWarning>
|
|
|
<head>
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"></meta>
|
|
|
- <Script src="https://cdn.jsdelivr.net/npm/eruda" strategy="beforeInteractive" />
|
|
|
+ {(loadEruda && loadEruda.value === '1') && <Script src="https://cdn.jsdelivr.net/npm/eruda" strategy="beforeInteractive" />}
|
|
|
</head>
|
|
|
<body className={clsx(
|
|
|
"min-h-screen font-outfit text-foreground bg-background antialiased",
|