feat(i18n): enhance locale support and add under-construction messages
- Updated Header.tsx to use current locale in navigation links for proper routing - Increased MiniSparkline chart dimensions in market-stats.tsx for better visibility - Added under-construction translations for market, about, and prices pages in en.json and pt.json - Minor formatting adjustments with added blank lines across multiple components These changes improve internationalization and user experience by ensuring locale-aware navigation and providing informative placeholders for upcoming features.
This commit is contained in:
1 parent
5c1ccbc69a
commit
b5093cb49a
16 files changed
+259
-9
No files matched your search
@@ -46,3 +46,7 @@ export default async function LocaleLayout({
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import Header from "@/components/Header";
|
||||
import { UnderConstruction } from "@/components/under-construction";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>;
|
||||
}) {
|
||||
const { locale } = await params;
|
||||
const t = await getTranslations({ locale, namespace: "underConstruction" });
|
||||
return {
|
||||
title: t("market.title"),
|
||||
description: t("market.description"),
|
||||
};
|
||||
}
|
||||
|
||||
export default async function MarketPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>;
|
||||
}) {
|
||||
const { locale } = await params;
|
||||
const t = await getTranslations({
|
||||
locale,
|
||||
namespace: "underConstruction.market",
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="min-h-screen">
|
||||
<Header />
|
||||
<UnderConstruction
|
||||
title={t("title")}
|
||||
description={t("description")}
|
||||
locale={locale}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
import Header from "@/components/Header";
|
||||
import { UnderConstruction } from "@/components/under-construction";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>;
|
||||
}) {
|
||||
const { locale } = await params;
|
||||
const t = await getTranslations({ locale, namespace: "underConstruction" });
|
||||
return {
|
||||
title: t("prices.title"),
|
||||
description: t("prices.description"),
|
||||
};
|
||||
}
|
||||
|
||||
export default async function PricesPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>;
|
||||
}) {
|
||||
const { locale } = await params;
|
||||
const t = await getTranslations({
|
||||
locale,
|
||||
namespace: "underConstruction.prices",
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="min-h-screen">
|
||||
<Header />
|
||||
<UnderConstruction
|
||||
title={t("title")}
|
||||
description={t("description")}
|
||||
locale={locale}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
import Header from "@/components/Header";
|
||||
import { UnderConstruction } from "@/components/under-construction";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>;
|
||||
}) {
|
||||
const { locale } = await params;
|
||||
const t = await getTranslations({ locale, namespace: "underConstruction" });
|
||||
return {
|
||||
title: t("about.title"),
|
||||
description: t("about.description"),
|
||||
};
|
||||
}
|
||||
|
||||
export default async function AboutPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>;
|
||||
}) {
|
||||
const { locale } = await params;
|
||||
const t = await getTranslations({
|
||||
locale,
|
||||
namespace: "underConstruction.about",
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="min-h-screen">
|
||||
<Header />
|
||||
<UnderConstruction
|
||||
title={t("title")}
|
||||
description={t("description")}
|
||||
locale={locale}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user