From 1900d6ac3695499e7e5ddb9e1bed279988d04dd9 Mon Sep 17 00:00:00 2001 From: Pouya Defaei Date: Fri, 22 May 2026 21:08:27 +0330 Subject: [PATCH] fix the issues --- src/app/[locale]/academy/[slug]/page.tsx | 2 +- src/app/[locale]/academy/page.tsx | 2 +- src/app/[locale]/network/page.tsx | 2 - src/app/[locale]/page.tsx | 2 +- src/components/shared/Navbar.tsx | 59 ++++++++++++++++++++---- src/components/software/hero/Hero.tsx | 2 +- src/middleware.ts | 1 + 7 files changed, 55 insertions(+), 15 deletions(-) diff --git a/src/app/[locale]/academy/[slug]/page.tsx b/src/app/[locale]/academy/[slug]/page.tsx index 3a31f14..812a93f 100644 --- a/src/app/[locale]/academy/[slug]/page.tsx +++ b/src/app/[locale]/academy/[slug]/page.tsx @@ -29,7 +29,7 @@ export default async function SingleAcademyPage({ params }: { params: Promise<{ const readingTime = calculateReadingTime(translation); return ( -
+
[]); return ( -
+
diff --git a/src/app/[locale]/network/page.tsx b/src/app/[locale]/network/page.tsx index bc6909c..95fbe0f 100644 --- a/src/app/[locale]/network/page.tsx +++ b/src/app/[locale]/network/page.tsx @@ -2,8 +2,6 @@ import Hero from "@/components/network/Hero"; import Services from "@/components/network/Services"; import Technologies from "@/components/network/Technologies"; import Projects from "@/components/network/Projects"; -import Consultation from "@/components/network/Consultation"; -import ContactFooter from "@/components/network/ContactFooter"; import { Portfolio } from "@/utilities/types/portfolio.type"; import { BACKEND_URL_LOCAL } from "@/utilities/constants/urls.constant"; diff --git a/src/app/[locale]/page.tsx b/src/app/[locale]/page.tsx index 8d64684..87c8fd0 100644 --- a/src/app/[locale]/page.tsx +++ b/src/app/[locale]/page.tsx @@ -21,7 +21,7 @@ export default async function HomePage({ params }: { params: Promise<{ locale: s ]); return ( -
+
diff --git a/src/components/shared/Navbar.tsx b/src/components/shared/Navbar.tsx index 4693980..a065a31 100644 --- a/src/components/shared/Navbar.tsx +++ b/src/components/shared/Navbar.tsx @@ -13,13 +13,53 @@ export default function Navbar() { const router = useRouter(); const languages = [ - { code: "fa", flag: "🇮🇷", label: "فارسی" }, - { code: "en", flag: "🇬🇧", label: "English" }, - { code: "ar", flag: "🇸🇦", label: "العربية" }, + { + code: "fa", + label: "فارسی", + icon: ( + + + + + + ﷲ + + + ), + }, + { + code: "en", + label: "English", + icon: ( + + + + + + + + ), + }, + { + code: "ar", + label: "العربية", + icon: ( + + + + + + ), + }, ]; const handleLanguageChange = (newLocale: string) => { - // Replace the current locale in the URL path with the new one const newPath = pathname.replace(new RegExp(`^/${locale}`), `/${newLocale}`); router.replace(newPath); }; @@ -65,12 +105,12 @@ export default function Navbar() { ))}
@@ -123,11 +163,12 @@ export default function Navbar() { ))}
diff --git a/src/components/software/hero/Hero.tsx b/src/components/software/hero/Hero.tsx index bca8e31..b88678f 100644 --- a/src/components/software/hero/Hero.tsx +++ b/src/components/software/hero/Hero.tsx @@ -17,7 +17,7 @@ export default function Hero() {

{t("description")}

-
+

{t("stats.deliveredProjects")} diff --git a/src/middleware.ts b/src/middleware.ts index db2b087..e2581e3 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -5,6 +5,7 @@ export default createMiddleware({ locales: ["fa", "en", "ar"], defaultLocale: "fa", localePrefix: "always", + localeDetection: false, }); export const config = {