diff --git a/src/app/(main)/globals.css b/src/app/(main)/globals.css index 7768b0a..3979b74 100644 --- a/src/app/(main)/globals.css +++ b/src/app/(main)/globals.css @@ -39,6 +39,8 @@ --color-colorBtnPrimaryText: var(--color-colorExt20); --color-colorBtnSecondary: var(--color-colorExt50); --color-colorBtnSecondaryText: var(--color-colorExt20); + --color-colorLinkText1: var(--color-colorExt30); + --color-colorLinkText2: var(--color-colorext40); } @layer components { diff --git a/src/components/layouts/Header.tsx b/src/components/layouts/Header.tsx index a6d1081..9bc29a4 100644 --- a/src/components/layouts/Header.tsx +++ b/src/components/layouts/Header.tsx @@ -1,18 +1,7 @@ -import { headers } from "next/headers"; -import HeaderFeaturedHomes from "./HeaderFeaturedHomes"; import { HeaderDropdown, HeaderDropdownGroup, HeaderDropdownMenu } from "./HeaderDropdown"; +import HeaderFeaturedHomes from "./HeaderFeaturedHomes"; -export default async function Header() { - const headerList = await headers(); - const fullUrl = headerList.get("x-full-url"); - - const headerActive = (pathName: string) => { - if (!fullUrl) return ""; - const splittedUrl = fullUrl.split("/"); - - return splittedUrl[3] === pathName ? "active" : ""; - }; - +export default function Header() { return (
@@ -113,6 +102,108 @@ export default async function Header() { Buying / Selling + + +
+
+
+ + +
+
+
+
+ +
+
+ + + + + + + +
+ + FAQ + + + LOOKING FOR SELL + +
+
+
  • @@ -139,22 +230,22 @@ export default async function Header() { list={[ { title: "Our Rentals", - href: "/#", + href: "#", }, { title: "Application Process", child: [ { title: "Before You Apply", - href: "/#", + href: "#", }, { title: "Rental Criteria", - href: "/#", + href: "#", }, { title: "Before You Apply", - href: "/#", + href: "#", }, ], }, @@ -169,15 +260,15 @@ export default async function Header() { child: [ { title: "What To Be Done Prior", - href: "/#", + href: "#", }, { title: "Next Steps (keys, utilities, etc)", - href: "/#", + href: "#", }, { title: "Common Questions", - href: "/#", + href: "#", }, ], }, @@ -203,15 +294,15 @@ export default async function Header() { child: [ { title: "What To Be Done Prior", - href: "/#", + href: "#", }, { title: "Next Steps (keys, utilities, etc)", - href: "/#", + href: "#", }, { title: "Common Questions", - href: "/#", + href: "#", }, ], }, @@ -220,10 +311,10 @@ export default async function Header() {
    - + FAQ - + APPLY NOW
    @@ -237,181 +328,9 @@ export default async function Header() {
  • - LOGIN + Login
  • - {/*
  • - - Properties - - - -
  • -
  • - - About Us - -
  • -
  • - - Blog - - - -
  • -
  • - - Pages - - - -
    -
    -
    - - -
    -
    -
    -
    - -
    -
    - - - - - - - - - -
    -
  • -
  • - - Contact Us - -
  • */}
    diff --git a/src/components/layouts/HeaderDropdown.tsx b/src/components/layouts/HeaderDropdown.tsx index e29d103..32b3ff9 100644 --- a/src/components/layouts/HeaderDropdown.tsx +++ b/src/components/layouts/HeaderDropdown.tsx @@ -2,8 +2,12 @@ import { createSlug } from "@/utils/general"; import { cn } from "@/utils/style"; import { FC, Fragment, PropsWithChildren } from "react"; -export const HeaderDropdown: FC = ({ children }) => { - return ; +type HeaderDropdownProps = { + className?: string; +}; + +export const HeaderDropdown: FC> = ({ children, className }) => { + return
      {children}
    ; }; type HeaderDropdownGroupProps = { @@ -24,7 +28,7 @@ export const HeaderDropdownGroup: FC ); }; -type HeaderDropdownMenuItem = { title: string; href: string }; +type HeaderDropdownMenuItem = { title: string; href?: string }; type HeaderDropdownMenuItemWithChild = { title: string; child: HeaderDropdownMenuItem[] }; type HeaderDropdownMenuProps = { @@ -37,13 +41,14 @@ export const HeaderDropdownMenu: FC = ({ list = [] }) = {list.map((item, idx) => { const collapseId = createSlug(`collapse-${item.title}-${idx}`); const hasChild = "child" in item; + const hrefClass = hasChild || !!item?.href ? "text-colorLinkText1! hover:text-colorLinkText2!" : ""; return ( {hasChild && (
  • = ({ list = [] }) =
    {item.child.map((itemChild, itemChildIdx) => ( - + - {itemChild.title} ))} @@ -63,7 +68,7 @@ export const HeaderDropdownMenu: FC = ({ list = [] }) = {!hasChild && (
  • - + {item.title}