feat: Update footer layout, add social media links, and improve styling

This commit is contained in:
mauro-balades
2024-09-02 18:43:52 +02:00
parent 7071eed755
commit 44a697ee49
4 changed files with 39 additions and 16 deletions

View File

@@ -11,8 +11,6 @@ import { notFound } from "next/navigation";
const inter = Inter({ subsets: ["latin"] });
export const runtime = 'edge';
export const metadata: Metadata = {
title: "Zen Browser",
description: "Download now and experience the Zen Browser",

35
src/i18n.ts Normal file
View File

@@ -0,0 +1,35 @@
import { getRequestConfig } from "next-intl/server";
import { headers } from "next/headers";
const SUPPORTED_LANGUAGES = ['en', 'de', 'ro'];
export default getRequestConfig(async () => {
const headersList = headers();
const acceptLanguage = headersList.get("accept-language") || "en";
const [primaryLanguage] = acceptLanguage
.split(",")
.map((lang) => lang.split(";")[0])
.map((lang) => lang.toLowerCase());
const locale = SUPPORTED_LANGUAGES.includes(primaryLanguage) ? primaryLanguage : 'en';
try {
const messages = (await import(`../messages/${locale}.json`)).default;
return {
locale,
messages,
};
} catch (error) {
console.error(`Failed to load messages for locale: ${locale}`, error);
const fallbackMessages = (await import(`../messages/en.json`)).default;
return {
locale: "en",
messages: fallbackMessages,
};
}
});