feat: Update footer layout, add social media links, and improve styling
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
const createNextIntlPlugin = require('next-intl/plugin');
|
const createNextIntlPlugin = require('next-intl/plugin');
|
||||||
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
|
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
|
||||||
|
|
||||||
|
const withNextIntl = createNextIntlPlugin();
|
||||||
|
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = (phase, { defaultConfig }) => {
|
const nextConfig = (phase, { defaultConfig }) => {
|
||||||
const defaultConfigWWW = {
|
const defaultConfigWWW = {
|
||||||
@@ -29,18 +31,6 @@ const nextConfig = (phase, { defaultConfig }) => {
|
|||||||
compiler: {
|
compiler: {
|
||||||
styledComponents: true,
|
styledComponents: true,
|
||||||
},
|
},
|
||||||
webpack: (
|
|
||||||
config,
|
|
||||||
{ buildId, dev, isServer, defaultLoaders, nextRuntime, webpack }
|
|
||||||
) => {
|
|
||||||
// Important: return the modified config
|
|
||||||
return {
|
|
||||||
output: {
|
|
||||||
// ...
|
|
||||||
globalObject: 'this',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
if (phase === PHASE_DEVELOPMENT_SERVER) {
|
if (phase === PHASE_DEVELOPMENT_SERVER) {
|
||||||
return {
|
return {
|
||||||
@@ -55,4 +45,4 @@ const nextConfig = (phase, { defaultConfig }) => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = nextConfig;
|
module.exports = withNextIntl(nextConfig);
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ import { notFound } from "next/navigation";
|
|||||||
|
|
||||||
const inter = Inter({ subsets: ["latin"] });
|
const inter = Inter({ subsets: ["latin"] });
|
||||||
|
|
||||||
export const runtime = 'edge';
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "Zen Browser",
|
title: "Zen Browser",
|
||||||
description: "Download now and experience the Zen Browser",
|
description: "Download now and experience the Zen Browser",
|
||||||
|
|||||||
35
src/i18n.ts
Normal file
35
src/i18n.ts
Normal 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,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user