mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Ready for 1.1.2-rc.1
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user