diff --git a/next.config.ts b/next.config.ts
index 393a2fb..649be23 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -31,12 +31,12 @@ const nextConfig: NextConfig = {
defaultLocale: "en", // Default language
},
// Uncomment these if you want to disable TypeScript build errors or ESLint during build
- // typescript: {
- // ignoreBuildErrors: true
- // },
- // eslint: {
- // ignoreDuringBuilds: true
- // }
+ typescript: {
+ ignoreBuildErrors: true
+ },
+ eslint: {
+ ignoreDuringBuilds: true
+ }
};
export default nextConfig;
diff --git a/package-lock.json b/package-lock.json
index f610776..575faff 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -15,6 +15,7 @@
"dompurify": "^3.2.3",
"framer-motion": "^11.15.0",
"i18next": "^24.2.0",
+ "i18next-browser-languagedetector": "^8.0.2",
"moment": "^2.30.1",
"moment-hijri": "^3.0.0",
"next": "15.1.0",
@@ -3155,6 +3156,14 @@
}
}
},
+ "node_modules/i18next-browser-languagedetector": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-8.0.2.tgz",
+ "integrity": "sha512-shBvPmnIyZeD2VU5jVGIOWP7u9qNG3Lj7mpaiPFpbJ3LVfHZJvVzKR4v1Cb91wAOFpNw442N+LGPzHOHsten2g==",
+ "dependencies": {
+ "@babel/runtime": "^7.23.2"
+ }
+ },
"node_modules/i18next-fs-backend": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/i18next-fs-backend/-/i18next-fs-backend-2.6.0.tgz",
diff --git a/package.json b/package.json
index 0366eb2..6be313b 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
- "lint": "next lint"
+ "lint": "next lint",
+ "postbuild": "next-sitemap"
},
"dependencies": {
"@reach/portal": "^0.18.0",
@@ -16,6 +17,7 @@
"dompurify": "^3.2.3",
"framer-motion": "^11.15.0",
"i18next": "^24.2.0",
+ "i18next-browser-languagedetector": "^8.0.2",
"moment": "^2.30.1",
"moment-hijri": "^3.0.0",
"next": "15.1.0",
diff --git a/public/assets/images/Untitled-1-02.svg b/public/assets/images/Untitled-1-02.svg
deleted file mode 100644
index 34ce5a6..0000000
--- a/public/assets/images/Untitled-1-02.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
diff --git a/public/assets/images/Untitled-1-02.webp b/public/assets/images/Untitled-1-02.webp
new file mode 100644
index 0000000..1ed1c47
Binary files /dev/null and b/public/assets/images/Untitled-1-02.webp differ
diff --git a/src/components/language-switcher.tsx b/src/components/language-switcher.tsx
index bcf455d..6baa7a9 100644
--- a/src/components/language-switcher.tsx
+++ b/src/components/language-switcher.tsx
@@ -8,91 +8,90 @@ import http from "@/api/http";
import { useTranslation } from "next-i18next"; // Import the useTranslation hook
import { useRouter } from "next/router";
-
const data = [
{
- "name": "English",
- "code": "en"
+ name: "English",
+ code: "en",
},
{
- "name": "Spanish",
- "code": "es"
+ name: "Spanish",
+ code: "es",
},
{
- "name": "German",
- "code": "de"
+ name: "German",
+ code: "de",
},
{
- "name": "Uzbek",
- "code": "uz"
+ name: "Uzbek",
+ code: "uz",
},
{
- "name": "Portuguese",
- "code": "pt"
+ name: "Portuguese",
+ code: "pt",
},
{
- "name": "Bengali",
- "code": "bn"
+ name: "Bengali",
+ code: "bn",
},
{
- "name": "Chinese",
- "code": "zh"
+ name: "Chinese",
+ code: "zh",
},
{
- "name": "Azerbaijani",
- "code": "az"
+ name: "Azerbaijani",
+ code: "az",
},
{
- "name": "Urdu",
- "code": "ur"
+ name: "Urdu",
+ code: "ur",
},
{
- "name": "French",
- "code": "fr"
+ name: "French",
+ code: "fr",
},
{
- "name": "Turkish",
- "code": "tr"
+ name: "Turkish",
+ code: "tr",
},
{
- "name": "Indonesian",
- "code": "id"
+ name: "Indonesian",
+ code: "id",
},
{
- "name": "Swahili",
- "code": "sw"
+ name: "Swahili",
+ code: "sw",
},
{
- "name": "Russian",
- "code": "ru"
+ name: "Russian",
+ code: "ru",
},
{
- "name": "Arabic",
- "code": "ar"
+ name: "Arabic",
+ code: "ar",
},
{
- "name": "Tajik",
- "code": "tg"
+ name: "Tajik",
+ code: "tg",
},
{
- "name": "Persian",
- "code": "fa"
+ name: "Persian",
+ code: "fa",
},
{
- "name": "Gujarati",
- "code": "gu"
+ name: "Gujarati",
+ code: "gu",
},
{
- "name": "Kashmiri",
- "code": "ks"
+ name: "Kashmiri",
+ code: "ks",
},
{
- "name": "Hausa",
- "code": "ha"
- }
-]
+ name: "Hausa",
+ code: "ha",
+ },
+];
const LanguageSwitcher: React.FC = () => {
- const { t } = useTranslation('common'); // Initialize translation hook with 'common' namespace
+ const { t } = useTranslation("common"); // Initialize translation hook with 'common' namespace
const [isOpen, setIsOpen] = useState(false);
const { openModal } = useUI();
const router = useRouter();
@@ -102,7 +101,9 @@ const LanguageSwitcher: React.FC = () => {
typeof window !== "undefined" ? window.innerWidth : 0
);
- const [languages, setLanguages] = useState<{ code: string; name: string }[]>([]);
+ const [languages, setLanguages] = useState<{ code: string; name: string }[]>(
+ []
+ );
const [selectedLanguage, setSelectedLanguage] = useState