|
|
@@ -11,12 +11,13 @@ import {
|
|
|
import { serverGraphqlFetch } from "@utils/bagisto/index";
|
|
|
import NavbarSearchIcon from "./NavbarSearchIcon"
|
|
|
import type { GetTreefrontMenusResult } from "@/types/theme/menus";
|
|
|
-import { authOptions } from "@utils/auth";
|
|
|
-import { getServerSession } from "next-auth";
|
|
|
+// import { authOptions } from "@utils/auth";
|
|
|
+// import { getServerSession } from "next-auth";
|
|
|
+import { auth } from "@/utils/auth/auth-helper";
|
|
|
import TopSwiperBanner from "./TopSwiperBanner"
|
|
|
export default async function Navbar() {
|
|
|
|
|
|
- const session = await getServerSession(authOptions);// 游客是null
|
|
|
+ const session = await auth();// 游客是null
|
|
|
const isGuest = session === null;
|
|
|
|
|
|
const { data: menudata } = await serverGraphqlFetch<
|