full-stack-school/src/components/ConsoleSuppressor.tsx
2026-03-01 18:32:49 +00:00

19 lines
431 B
TypeScript

"use client";
if (typeof window !== "undefined") {
const originalError = console.error;
console.error = (...args) => {
if (
typeof args[0] === "string" &&
args[0].includes("Support for defaultProps will be removed from function components")
) {
return;
}
originalError(...args);
};
}
export default function ConsoleSuppressor() {
return null;
}