footer navbar linkes change with work asyn lamguage
This commit is contained in:
@@ -4,9 +4,10 @@ import Link from "next/link";
|
||||
import { ChevronDown, Phone, Menu, X } from "lucide-react";
|
||||
import Image from "next/image";
|
||||
import LanguageSelectRadix from "../languageSwitcher";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { useLocale, useTranslations } from "next-intl";
|
||||
|
||||
export function Navbar() {
|
||||
const locale = useLocale();
|
||||
const t = useTranslations();
|
||||
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
||||
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
||||
@@ -37,7 +38,7 @@ export function Navbar() {
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div className="flex justify-between items-center h-20">
|
||||
{/* Logo */}
|
||||
<Link href="/" className="hover:cursor-pointer">
|
||||
<Link href={`/${locale}/home`} className="hover:cursor-pointer">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className=" flex items-center justify-center">
|
||||
<Image
|
||||
@@ -54,13 +55,13 @@ export function Navbar() {
|
||||
{/* Desktop Navigation Menu */}
|
||||
<div className="hidden h-full lg:flex items-center gap-8">
|
||||
<Link
|
||||
href="/"
|
||||
href={`/${locale}/home`}
|
||||
className="font-unbounded uppercase text-white text-sm h-full flex items-center font-semibold hover:cursor-pointer hover:text-red-500 transition"
|
||||
>
|
||||
{t("navbar.home")}
|
||||
</Link>
|
||||
<Link
|
||||
href="/about"
|
||||
href={`/${locale}/about`}
|
||||
className="font-unbounded uppercase text-white text-sm h-full flex items-center font-semibold hover:cursor-pointer hover:text-red-500 transition"
|
||||
>
|
||||
{t("navbar.about")}
|
||||
@@ -88,21 +89,21 @@ export function Navbar() {
|
||||
pointer-events-none group-hover:pointer-events-auto overflow-hidden"
|
||||
>
|
||||
<Link
|
||||
href="/faq"
|
||||
href={`/${locale}/faq`}
|
||||
className="font-unbounded uppercase block px-4 py-2 text-black text-sm hover:bg-red-600
|
||||
hover:text-white transition-colors"
|
||||
>
|
||||
{t("navbar.faq")}
|
||||
</Link>
|
||||
<Link
|
||||
href="/services"
|
||||
href={`/${locale}/services`}
|
||||
className="font-unbounded uppercase block px-4 py-2 text-black text-sm hover:bg-red-600
|
||||
hover:text-white transition-colors"
|
||||
>
|
||||
{t("navbar.services")}
|
||||
</Link>
|
||||
{/* <Link
|
||||
href="/blog"
|
||||
href={`/${locale}/blog`}
|
||||
className="font-unbounded uppercase block px-4 py-2 text-black text-sm hover:bg-red-600
|
||||
hover:text-white transition-colors rounded-b-md"
|
||||
>
|
||||
@@ -112,13 +113,13 @@ export function Navbar() {
|
||||
</div>
|
||||
|
||||
<Link
|
||||
href="/products"
|
||||
href={`/${locale}/products`}
|
||||
className="font-unbounded uppercase text-white text-sm h-full flex items-center font-semibold hover:cursor-pointer hover:text-red-500 transition"
|
||||
>
|
||||
{t("navbar.products")}
|
||||
</Link>
|
||||
<Link
|
||||
href="/contact"
|
||||
href={`/${locale}/contact`}
|
||||
className="font-unbounded uppercase text-white text-sm h-full flex items-center font-semibold hover:cursor-pointer hover:text-red-500 transition"
|
||||
>
|
||||
{t("navbar.contact")}
|
||||
@@ -130,14 +131,16 @@ export function Navbar() {
|
||||
<LanguageSelectRadix />
|
||||
|
||||
{/* Emergency Call Button - Hidden on mobile */}
|
||||
<div className="hidden lg:flex items-center gap-3 bg-red-600 px-4 py-2 rounded-full">
|
||||
<Phone size={20} className="text-white" />
|
||||
<div className="hidden lg:flex items-center hover:cursor-pointer gap-3 px-4 py-2 rounded-full">
|
||||
<span
|
||||
className="shrink-0 w-10 h-10 bg-red-600 rounded-full flex items-center justify-center
|
||||
shadow-[0_0_0px_4px_rgba(239,68,68,0.1)]"
|
||||
>
|
||||
<Phone size={20} className="text-white" />
|
||||
</span>
|
||||
<div>
|
||||
<div className="font-unbounded uppercase text-white text-xs font-semibold">
|
||||
{t("navbar.emergency")}
|
||||
</div>
|
||||
<div className="text-white text-sm font-bold">
|
||||
+123-456-7890
|
||||
<div>+998-98-099-21-21</div> <div>+998-77-372-21-21</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -173,7 +176,7 @@ export function Navbar() {
|
||||
{/* Mobile Menu Header */}
|
||||
<div className="flex justify-between items-center p-6 border-b border-gray-700">
|
||||
{/* Logo */}
|
||||
<Link href="/" className="hover:cursor-pointer">
|
||||
<Link href={`/${locale}/home`} className="hover:cursor-pointer">
|
||||
<div className="font-unbounded uppercase flex flex-col items-center text-2xl gap-2 text-white font-bold">
|
||||
<div className=" flex items-center justify-center">
|
||||
<Image
|
||||
@@ -197,14 +200,14 @@ export function Navbar() {
|
||||
{/* Mobile Menu Links */}
|
||||
<div className="flex flex-col p-6 gap-4">
|
||||
<Link
|
||||
href="/"
|
||||
href={`/${locale}/home`}
|
||||
className="font-unbounded uppercase text-white text-base font-semibold hover:text-red-500 transition py-2"
|
||||
onClick={() => setIsMobileMenuOpen(false)}
|
||||
>
|
||||
{t("navbar.home")}
|
||||
</Link>
|
||||
<Link
|
||||
href="/about"
|
||||
href={`/${locale}/about`}
|
||||
className="font-unbounded uppercase text-white text-base font-semibold hover:text-red-500 transition py-2"
|
||||
onClick={() => setIsMobileMenuOpen(false)}
|
||||
>
|
||||
@@ -226,14 +229,14 @@ export function Navbar() {
|
||||
{isDropdownOpen && (
|
||||
<div className="ml-4 mt-2 flex flex-col gap-2">
|
||||
<Link
|
||||
href="/faq"
|
||||
href={`/${locale}/faq`}
|
||||
className="font-unbounded uppercase text-white/80 text-sm hover:text-red-500 transition py-2"
|
||||
onClick={() => setIsMobileMenuOpen(false)}
|
||||
>
|
||||
{t("navbar.faq")}
|
||||
</Link>
|
||||
<Link
|
||||
href="/services"
|
||||
href={`/${locale}/services`}
|
||||
className="font-unbounded uppercase text-white/80 text-sm hover:text-red-500 transition py-2"
|
||||
onClick={() => setIsMobileMenuOpen(false)}
|
||||
>
|
||||
@@ -244,14 +247,14 @@ export function Navbar() {
|
||||
</div>
|
||||
|
||||
<Link
|
||||
href="/products"
|
||||
href={`/${locale}/products`}
|
||||
className="font-unbounded uppercase text-white text-base font-semibold hover:text-red-500 transition py-2"
|
||||
onClick={() => setIsMobileMenuOpen(false)}
|
||||
>
|
||||
{t("navbar.products")}
|
||||
</Link>
|
||||
<Link
|
||||
href="/contact"
|
||||
href={`/${locale}/contact`}
|
||||
className="font-unbounded uppercase text-white text-base font-semibold hover:text-red-500 transition py-2"
|
||||
onClick={() => setIsMobileMenuOpen(false)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user