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,9 +265,12 @@ const Layout = ({ children }) => {
pattern.toCanvas(bgCanvasRef.current);
}
} catch (error) {
// Canvas/trianglify not available, skip background generation
// 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);
}
}
};
generateBackground();

View File

@@ -81,9 +81,12 @@ const Login = () => {
pattern.toCanvas(canvasRef.current);
}
} catch (error) {
// Canvas/trianglify not available, skip background generation
// 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);
}
}
};
generateBackground();