Ready for 1.1.2-rc.1

This commit is contained in:
charlesgauthereau
2025-09-23 19:50:33 +02:00
parent 2d2453acf7
commit 54a233b207
2 changed files with 17 additions and 1 deletions
+2 -1
View File
@@ -1,10 +1,10 @@
import React from "react"; import React from "react";
import type {Metadata} from "next"; import type {Metadata} from "next";
import {Inter} from "next/font/google"; import {Inter} from "next/font/google";
import "./globals.css"; import "./globals.css";
import {Providers} from "./providers"; import {Providers} from "./providers";
import {cn} from "@/lib/utils"; import {cn} from "@/lib/utils";
import {ConsoleSilencer} from "@/components/wrappers/common/console-silencer";
const inter = Inter({subsets: ["latin"]}); const inter = Inter({subsets: ["latin"]});
@@ -24,6 +24,7 @@ export default function RootLayout({
<meta name="apple-mobile-web-app-title" content="Portabase"/> <meta name="apple-mobile-web-app-title" content="Portabase"/>
</head> </head>
<body className={cn(inter.className, "h-full")}> <body className={cn(inter.className, "h-full")}>
<ConsoleSilencer/>
<Providers>{children}</Providers> <Providers>{children}</Providers>
</body> </body>
</html> </html>
@@ -0,0 +1,15 @@
"use client";
import { useEffect } from "react";
export function ConsoleSilencer() {
useEffect(() => {
if (process.env.NODE_ENV === "production") {
for (const method of ["log", "debug", "info", "warn", "error"] as const) {
console[method] = () => {};
}
}
}, []);
return null;
}