* 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]>
17 lines
445 B
TypeScript
17 lines
445 B
TypeScript
import { CALCOM_VERSION } from "@calcom/lib/constants";
|
|
import { trpc } from "@calcom/trpc/react";
|
|
|
|
export function useViewerI18n(locale: string) {
|
|
return trpc.viewer.i18n.get.useQuery(
|
|
{ locale, CalComVersion: CALCOM_VERSION },
|
|
{
|
|
/**
|
|
* i18n should never be clubbed with other queries, so that it's caching can be managed independently.
|
|
**/
|
|
trpc: {
|
|
context: { skipBatch: true },
|
|
},
|
|
}
|
|
);
|
|
}
|