|
@@ -9,7 +9,9 @@ import { NavigationSkeleton } from "./NavigationSkeleton";
|
|
|
import { ActionsSkeleton } from "./ActionsSkeleton";
|
|
import { ActionsSkeleton } from "./ActionsSkeleton";
|
|
|
import { NavbarErrorBoundary } from "@/components/error/ErrorBoundary";
|
|
import { NavbarErrorBoundary } from "@/components/error/ErrorBoundary";
|
|
|
|
|
|
|
|
-// import { GET_TREE_CATEGORIES,GET_TREEFRONT_MENUS } from "@/graphql";
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ // GET_TREE_CATEGORIES,
|
|
|
|
|
+ GET_TREEFRONT_MENUS } from "@/graphql";
|
|
|
// import { cachedGraphQLRequest } from "@utils/hooks/useCache";
|
|
// import { cachedGraphQLRequest } from "@utils/hooks/useCache";
|
|
|
import { serverGraphqlFetch } from "@utils/bagisto/index";
|
|
import { serverGraphqlFetch } from "@utils/bagisto/index";
|
|
|
// import { TreeCategoriesResponse } from "@/types/theme/category-tree";
|
|
// import { TreeCategoriesResponse } from "@/types/theme/category-tree";
|
|
@@ -34,7 +36,7 @@ export default async function Navbar() {
|
|
|
query: GET_TREEFRONT_MENUS,
|
|
query: GET_TREEFRONT_MENUS,
|
|
|
});
|
|
});
|
|
|
console.log('GetTreefrontMenusResult --- ',menudata)
|
|
console.log('GetTreefrontMenusResult --- ',menudata)
|
|
|
- const menudatas = menudata.treefrontMenus;
|
|
|
|
|
|
|
+ const menudatas =menudata? menudata.treefrontMenus:[];
|
|
|
// const filteredCategories = categories
|
|
// const filteredCategories = categories
|
|
|
// .filter((cat: any) => cat.id !== "1")
|
|
// .filter((cat: any) => cat.id !== "1")
|
|
|
// .map((cat: any) => {
|
|
// .map((cat: any) => {
|