refactor(web-next): move bindAll to root layout

Centralizes DI initialization in the root layout so individual pages
and the tRPC route handler no longer need to import or call it.
This commit is contained in:
danijel-lf
2026-05-26 14:19:00 +02:00
parent d71e30bb3a
commit 15d603b00c
5 changed files with 2 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
import type { Metadata } from "next";
import "../styles/app.css";
import { getNonce } from "@repo/core-shared/security/next";
import { bindAll } from "../server/bind-production";
import { Providers } from "./providers";
export const metadata: Metadata = {
@@ -13,6 +14,7 @@ export default async function RootLayout({
}: {
children: React.ReactNode;
}) {
await bindAll();
const nonce = await getNonce();
return (