reason: locale removed from url

This commit is contained in:
Mahyar Khanbolooki
2025-07-27 17:00:24 +03:30
parent 852f34d363
commit 25e1df75e4
25 changed files with 13 additions and 13 deletions
@@ -222,7 +222,7 @@ const MenuIndex = () => {
return (
<div className="flex flex-col gap-4 items-center pt-8" ref={wrapperRef}>
<div className="flex flex-col gap-4 items-center pt-8 mb-8" ref={wrapperRef}>
<div className="w-full">
<SearchBox value={search} placeholder={tCommon('SearchPlaceholder')} onChange={updateSearch} />
<HorizontalScrollView className="w-full noscrollbar mt-4! py-4!">
@@ -1,26 +1,24 @@
import { Metadata } from "next";
import "../globals.css";
import "./globals.css";
import { ReactQueryProvider } from "@/components/providers/ReactQueryProvider";
import { notFound } from "next/navigation";
import i18nConfig from "../../../i18nConfig";
import i18nConfig from "../../i18nConfig";
import initTranslations from '@/lib/i18n';
import TranslationsProvider from "@/components/utils/TranslationsProdiver";
export const metadata: Metadata = {
title: 'Dashboard',
description: 'Webapp dashboard'
description: 'Webapp dashboard',
}
const i18nNamespaces = ['common', 'menu', 'orders', 'auth'];
export default async function RootLayout({
children,
params,
}: Readonly<{
children: React.ReactNode;
params: Promise<{ locale: string }>
}>) {
const { locale } = await params;
const locale = "fa";
if (!i18nConfig.locales.includes(locale)) {
notFound();
}
@@ -28,9 +26,12 @@ export default async function RootLayout({
return (
<html lang={locale} className="h-svh overflow-hidden">
<html
lang='fa'
dir='rtl'
className="h-svh overflow-hidden">
<body
dir={locale === 'fa' ? 'rtl' : 'ltr'}
className={`antialiased bg-background h-svh overflow-hidden`}
>
<ReactQueryProvider>