From 3ce8c02a31a3d89c5c5a9b246fa65ebb92d17261 Mon Sep 17 00:00:00 2001 From: Muhammad Ibrahim Date: Tue, 28 Oct 2025 18:30:49 +0000 Subject: [PATCH] fix: suppress Trianglify errors in production to reduce console noise --- frontend/src/components/Layout.jsx | 7 +++++-- frontend/src/pages/Login.jsx | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/Layout.jsx b/frontend/src/components/Layout.jsx index 5032ec1..a50c65c 100644 --- a/frontend/src/components/Layout.jsx +++ b/frontend/src/components/Layout.jsx @@ -265,8 +265,11 @@ const Layout = ({ children }) => { pattern.toCanvas(bgCanvasRef.current); } } catch (error) { - // Canvas/trianglify not available, skip background generation - console.warn("Could not generate Trianglify background:", error); + // Canvas/trianglify not available, skip background generation silently + // Only log in development for debugging + if (import.meta.env.DEV) { + console.warn("Could not generate Trianglify background:", error); + } } }; diff --git a/frontend/src/pages/Login.jsx b/frontend/src/pages/Login.jsx index 9979476..42d37a3 100644 --- a/frontend/src/pages/Login.jsx +++ b/frontend/src/pages/Login.jsx @@ -81,8 +81,11 @@ const Login = () => { pattern.toCanvas(canvasRef.current); } } catch (error) { - // Canvas/trianglify not available, skip background generation - console.warn("Could not generate Trianglify background:", error); + // Canvas/trianglify not available, skip background generation silently + // Only log in development for debugging + if (import.meta.env.DEV) { + console.warn("Could not generate Trianglify background:", error); + } } };