diff --git a/package.json b/package.json index e6a709e..0e27586 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "web-vitals": "^1.0.1" }, "resolutions": { - "@types/react": "17.0.30" + "@types/react": "17.0.30", + "react-error-overlay": "6.0.9" } } diff --git a/src/components/metrics/index.tsx b/src/components/metrics/index.tsx index b4f1add..9dc69ad 100644 --- a/src/components/metrics/index.tsx +++ b/src/components/metrics/index.tsx @@ -70,9 +70,9 @@ export const Metrics = (params: { latency: number; latencyPerBlock: number[]; }) => { - const isLessLaptop = useMediaQuery({ maxDeviceWidth: "852px" }); - const isLessTablet = useMediaQuery({ maxDeviceWidth: breakpoints.tablet }); - const isLessMobileM = useMediaQuery({ maxDeviceWidth: "468px" }); + const isLessLaptop = useMediaQuery({ query: '(max-width: 852px)' }); + const isLessTablet = useMediaQuery({ query: `(max-width: ${breakpoints.tablet})` }); + const isLessMobileM = useMediaQuery({ query: '(max-width: 468px)' }); return ( - - {!isLessMobileM && } - - - - - {!isLessMobileM && } - - - {isLessLaptop && ( - - )} - - + + + {!isLessMobileM && } + + + + + {!isLessMobileM && } + + + {isLessLaptop && ( + + )} - - {isLessLaptop && ( - - )} - - + + + + + + );