fix: suppress Trianglify errors in production to reduce console noise

This commit is contained in:
Muhammad Ibrahim
2025-10-28 18:30:49 +00:00
parent ac420901a6
commit 3ce8c02a31
2 changed files with 10 additions and 4 deletions

View File

@@ -265,8 +265,11 @@ const Layout = ({ children }) => {
pattern.toCanvas(bgCanvasRef.current); pattern.toCanvas(bgCanvasRef.current);
} }
} catch (error) { } catch (error) {
// Canvas/trianglify not available, skip background generation // Canvas/trianglify not available, skip background generation silently
console.warn("Could not generate Trianglify background:", error); // Only log in development for debugging
if (import.meta.env.DEV) {
console.warn("Could not generate Trianglify background:", error);
}
} }
}; };

View File

@@ -81,8 +81,11 @@ const Login = () => {
pattern.toCanvas(canvasRef.current); pattern.toCanvas(canvasRef.current);
} }
} catch (error) { } catch (error) {
// Canvas/trianglify not available, skip background generation // Canvas/trianglify not available, skip background generation silently
console.warn("Could not generate Trianglify background:", error); // Only log in development for debugging
if (import.meta.env.DEV) {
console.warn("Could not generate Trianglify background:", error);
}
} }
}; };