feat: fixing i18n error, remove some template text

This commit is contained in:
hanif salafi 2025-01-01 23:29:11 +07:00
parent 0e0fe47392
commit 5359289dfd
4 changed files with 12 additions and 8 deletions

View File

@ -27,7 +27,7 @@ const Footer = () => {
<footer className="bg-[#bb3523] text-white text-xs lg:text-sm py-4">
<div className="container mx-auto flex flex-col md:flex-row justify-between items-center space-y-2 md:space-y-0 px-4">
{/* Hak Cipta */}
<div className="text-center md:text-left">Hak Cipta © 2023 Divisi Humas Polri. All Right Reserved.</div>
<div className="text-center md:text-left">Hak Cipta &copy; {new Date().getFullYear()} Divisi Humas Polri. All Right Reserved.</div>
{/* Menu Links */}
<div className="flex flex-wrap justify-center items-center space-x-3">

View File

@ -68,7 +68,7 @@ const ThemeCustomize = ({ }) => {
</div>
</SheetTitle>
</SheetHeader>
<ScrollArea className="h-[calc(100%-120px)] -mx-6">
<ScrollArea className="h-[calc(100%-100px)] -mx-6">
<div className=" space-y-8 mt-3">
<Tabs defaultValue="style" className=" w-full">
<TabsList className="w-full border border-solid border-default-200 dark:border-default-300 rounded-none p-0 divide-x gap-0 ">
@ -117,9 +117,9 @@ const ThemeCustomize = ({ }) => {
</Tabs>
</div>
</ScrollArea>
<SheetFooter className="lg:py-4 lg:gap-3 gap-2 flex justify-between ">
{/* <SheetFooter className="lg:py-4 lg:gap-3 gap-2 flex justify-between ">
<BuyButton />
</SheetFooter>
</SheetFooter> */}
</SheetContent>
</Sheet>
);

View File

@ -10,8 +10,7 @@ const DashCodeFooter = () => {
<div className=" md:flex justify-between text-default-600 hidden">
<div className="text-center ltr:md:text-start rtl:md:text-right text-sm"></div>
<div className="ltr:md:text-right rtl:md:text-end text-center text-sm">
COPYRIGHT &copy; {new Date().getFullYear()} Media Hub, All rights
Reserved
Hak Cipta &copy; {new Date().getFullYear()} Divisi Humas Polri Hub. All rights Reserved.
</div>
</div>
<div className="flex md:hidden justify-around items-center">

View File

@ -2,11 +2,16 @@ import {notFound} from 'next/navigation';
import {getRequestConfig} from 'next-intl/server';
import {routing} from './routing';
export default getRequestConfig(async ({locale}) => {
export default getRequestConfig(async ({requestLocale}) => {
let locale = await requestLocale;
// Validate that the incoming `locale` parameter is valid
if (!routing.locales.includes(locale as any)) notFound();
// if (!routing.locales.includes(locale as any)) notFound();
if (!locale || !routing.locales.includes(locale as any)) {
locale = routing.defaultLocale;
}
return {
locale,
messages: (await import(`../messages/${locale}.json`)).default
};
});