mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* perf: Slim down loggedInViewer tRPC router * Fixed trpc client calls for new routes * Moved bookingUnconfirmedCount * Moved getUserTopBanners to me router * Moved shouldVerifyEmail to me router * Moved i18n from public to its own router * fix ssrInit * fix ssrInit usage * fix type check * better naming * fix * fix * Fix types * Removed used of importHandler --------- Co-authored-by: hbjORbj <[email protected]>
19 lines
432 B
TypeScript
19 lines
432 B
TypeScript
import type { I18nInputSchema } from "./i18n.schema";
|
|
|
|
type I18nOptions = {
|
|
input: I18nInputSchema;
|
|
};
|
|
|
|
export const i18nHandler = async ({ input }: I18nOptions) => {
|
|
const { locale } = input;
|
|
const { serverSideTranslations } = await import("next-i18next/serverSideTranslations");
|
|
const i18n = await serverSideTranslations(locale, ["common", "vital"]);
|
|
|
|
return {
|
|
i18n,
|
|
locale,
|
|
};
|
|
};
|
|
|
|
export default i18nHandler;
|