- Created demo emails with various states (inbox, sent, drafts, trash, etc.) in `emails.ts`. - Added demo file nodes representing directories and files in `files.ts`. - Implemented demo Sieve capabilities and scripts in `filters.ts`. - Defined demo identities for users in `identities.ts`. - Established demo mailboxes with permissions and counts in `mailboxes.ts`. - Created a demo vacation response in `vacation.ts`. - Introduced a comprehensive JMAP client interface in `client-interface.ts` to standardize interactions with the JMAP API.
38 lines
1.0 KiB
TypeScript
38 lines
1.0 KiB
TypeScript
import { notFound } from "next/navigation";
|
|
import { IntlProvider } from "@/components/providers/intl-provider";
|
|
import { ThemeProvider } from "@/components/providers/theme-provider";
|
|
import { CalendarAlertProvider } from "@/components/providers/calendar-alert-provider";
|
|
import { TourProvider } from "@/components/tour/tour-provider";
|
|
import { locales } from "@/i18n/routing";
|
|
|
|
export default async function LocaleLayout({
|
|
children,
|
|
params,
|
|
}: {
|
|
children: React.ReactNode;
|
|
params: Promise<{ locale: string }>;
|
|
}) {
|
|
const { locale } = await params;
|
|
|
|
if (!(locales as readonly string[]).includes(locale)) notFound();
|
|
|
|
let messages;
|
|
try {
|
|
messages = (await import(`@/locales/${locale}/common.json`)).default;
|
|
} catch {
|
|
notFound();
|
|
}
|
|
|
|
return (
|
|
<IntlProvider locale={locale} messages={messages}>
|
|
<ThemeProvider>
|
|
<CalendarAlertProvider>
|
|
<TourProvider>
|
|
{children}
|
|
</TourProvider>
|
|
</CalendarAlertProvider>
|
|
</ThemeProvider>
|
|
</IntlProvider>
|
|
);
|
|
}
|