diff --git a/user/src/components/Contact.jsx b/user/src/components/Contact.jsx index effdb28..3e3bff5 100644 --- a/user/src/components/Contact.jsx +++ b/user/src/components/Contact.jsx @@ -1,9 +1,11 @@ import banner from "./../assets/header-banner2.jpg"; import { Mail, MapPin, User, BookUser, MessageSquare, CheckCircle, XCircle, AlertTriangle, X } from "lucide-react"; import { useState, useEffect, useMemo } from "react"; +import { useTranslation } from "react-i18next"; // ✅ Import i18n hook const Contact = () => { - const [lang, setLang] = useState("en"); + const { i18n } = useTranslation(); // ✅ Use global i18n + const lang = i18n.language || "en"; // ✅ Get language from i18n const t = useMemo( () => ({ @@ -117,7 +119,7 @@ const Contact = () => { { id: "form", title: S.formTitle }, ]; - // Smooth scroll function (cross-browser safe) + // Smooth scroll function (cross-browser safe) const smoothScrollTo = (id) => { const target = document.getElementById(id); if (!target) return; @@ -139,12 +141,14 @@ const Contact = () => {
{S.subtitle}
{S.lastUpdated}
-Map data © Google
+Map data © Google