mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-26 14:28:04 +00:00
Added Error Boundary (#649)
* Added Error Boundary * Test improvements * Introduced useDevLogger * Updated Cypress to latest and aligned the tests * Added eslint-enable * Set allowCypressEnv: false for security reasons.
This commit is contained in:
9
frontend/src/hooks/useDevLogger.ts
Normal file
9
frontend/src/hooks/useDevLogger.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { useEffect } from "react";
|
||||
|
||||
export const useDevLogger = (error: unknown) => {
|
||||
useEffect(() => {
|
||||
if (import.meta.env.DEV) {
|
||||
console.error("UnexpectedError", error);
|
||||
}
|
||||
}, [error]);
|
||||
};
|
||||
Reference in New Issue
Block a user