'use client'
import React from 'react'
import Link from 'next/link'
import Logo from '/public/images/logo.png'
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, i18n } = useTranslation('common')
const router = useRouter()
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 (
<>
{/* 🔹 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 */}
{t('callUs')}
+1 (305) 330-7413
{t('emailNow')}
info@janahanlaw.com
{/* Contact Button */}
>
)
}
export default HeaderTopbar