dev #14
@ -5,7 +5,7 @@ import HeroOther from "@/components/HeroOther";
|
||||
import { getDefaultMetadata } from "@/utils/metadata";
|
||||
import { sanitizePageNumber } from "@/utils/sanitize";
|
||||
import { Metadata } from "next";
|
||||
import { headers } from "next/headers";
|
||||
// import { headers } from "next/headers";
|
||||
import { Suspense } from "react";
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
@ -21,8 +21,8 @@ export default async function CategoryPage({
|
||||
searchParams?: Promise<{ page?: string; s?: string }>;
|
||||
}) {
|
||||
const path = (await params)?.path;
|
||||
const headersList = await headers();
|
||||
const paramsCategory = path?.[0] ?? "";
|
||||
// const headersList = await headers();
|
||||
// const paramsCategory = path?.[0] ?? "";
|
||||
const paramsPage = path?.[2] ?? "";
|
||||
const paramsSearch = (await searchParams)?.s;
|
||||
const page = sanitizePageNumber(paramsPage);
|
||||
|
@ -60,7 +60,10 @@ export default function HeaderNav({ links, animateY = false }: { links: typeof n
|
||||
{link.text} <i className="mi-chevron-down" onClick={() => toggleDropdown([link.text])} />
|
||||
</Link>
|
||||
|
||||
<ul className={`mn-sub to-right ${isDropdownOpen.includes(link.text) && "open"}`} ref={dropdownRef}>
|
||||
<ul
|
||||
className={`mn-sub to-right ${isDropdownOpen.includes(link.text) && "open"} !bg-extColorPrimary8`}
|
||||
ref={dropdownRef}
|
||||
>
|
||||
{link.child.map((subLink: any, subLinkIdx: number) => (
|
||||
<li key={subLinkIdx}>
|
||||
{!Array.isArray(subLink?.child) && (
|
||||
@ -75,7 +78,9 @@ export default function HeaderNav({ links, animateY = false }: { links: typeof n
|
||||
<i className="mi-chevron-down" onClick={() => toggleDropdown([link.text, subLink.text])} />
|
||||
</Link>
|
||||
|
||||
<ul className={`mn-sub to-right ${isDropdownOpen.includes(subLink.text) && "open"}`}>
|
||||
<ul
|
||||
className={`mn-sub to-right ${isDropdownOpen.includes(subLink.text) && "open"} !bg-extColorPrimary8`}
|
||||
>
|
||||
{subLink.child.map((subLink2: any, subLinkIdx2: number) => (
|
||||
<li key={subLinkIdx2}>
|
||||
<Link href={subLink2?.href} onClick={() => toggleMobileMenu()}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user