diff --git a/components/HeaderTopbar/HeaderTopbar.js b/components/HeaderTopbar/HeaderTopbar.js
index 66dda34..573512b 100644
--- a/components/HeaderTopbar/HeaderTopbar.js
+++ b/components/HeaderTopbar/HeaderTopbar.js
@@ -7,43 +7,120 @@ import Image from 'next/image'
import { useTranslation } from 'next-i18next'
import { changeLanguage } from '../../utils/commonFunction.utils'
import { useRouter } from 'next/router'
+import Slider from 'react-slick'
const HeaderTopbar = () => {
- const { t } = useTranslation('common')
-
+ const { t, i18n } = useTranslation('common')
const router = useRouter()
- const handleLanguageChange = () => {
- changeLanguage(router, 'es'); // always switch to Spanish
- };
+ const handleLanguageChange = (locale) => {
+ changeLanguage(router, locale)
+ }
+
+ // Slider Settings
+ const settings = {
+ dots: false,
+ arrows: false,
+ infinite: true,
+ autoplay: true,
+ autoplaySpeed: 2000,
+ speed: 600,
+ slidesToShow: 1,
+ slidesToScroll: 1,
+ fade: true,
+ }
return (
<>
-
-
- Haz clic en el botón para cambiar a español.
-
-
-
+
+ {/* 🔹 Show only Spanish switch if current lang is English */}
+ {i18n.language === 'en' && (
+
+
+
+ Haz clic en el botón para cambiar el idioma a Español.
+
+
+
+
+ )}
+ {
+ i18n.language === 'es' && (
+
+
+
+ Haz clic en el botón para cambiar el idioma a Inglés.
+
+
+
+
+ )
+ }
+
+ {/* 🔹 Show only English switch if current lang is Spanish */}
+ {i18n.language === 'en' && (
+
+
+
+ Click the button to switch the language to Spanish.
+
+
+
+
+ )}
+ {i18n.language === 'es' && (
+
+
+
+ Click the button to switch the language to English.
+
+
+
+
+ )}
+
+ {/* 🔹 Main Topbar */}
+ {/* Logo */}
+ {/* Contact Info */}
@@ -67,6 +144,7 @@ const HeaderTopbar = () => {
+ {/* Contact Button */}
diff --git a/next-i18next.config.js b/next-i18next.config.js
index a7536ca..fb9dd1a 100644
--- a/next-i18next.config.js
+++ b/next-i18next.config.js
@@ -1,7 +1,7 @@
module.exports = {
i18n: {
- defaultLocale: 'es',
+ defaultLocale: 'en',
locales: ['en', 'es'],
localeDetection: false,
},