From 32260355891144eaf40093e7f1317e44a7ec78d9 Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Wed, 5 Mar 2025 09:11:15 +0530 Subject: [PATCH 01/16] fix-1847 truncate fix for selection component. --- src/Components/Inputs/Select/index.jsx | 38 ++++++++++++++++++++++++++ src/Utils/truncateUtils.jsx | 32 ++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 src/Utils/truncateUtils.jsx diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index f0a1d11c0..f6accc415 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -4,6 +4,8 @@ import { MenuItem, Select as MuiSelect, Stack, Typography } from "@mui/material" import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown"; import "./index.css"; +import { useEffect, useRef, useState } from "react"; +import { renderTruncatedValue } from "../../../Utils/truncateUtils.jsx"; /** * @component @@ -50,7 +52,12 @@ const Select = ({ sx, name = "", labelControlSpacing = 2, + truncate = false, + maxStringLength = 10, }) => { + const [maxLength, setMaxLength] = useState(0); // Initially set maxLength to 0 + const selectRef = useRef(null); // Reference for the Select container + const theme = useTheme(); const itemStyles = { fontSize: "var(--env-var-font-size-medium)", @@ -59,6 +66,31 @@ const Select = ({ margin: theme.spacing(2), }; + // Dynamically adjust maxLength based on window width + useEffect(() => { + if (!truncate) return; // If truncate is false, do not run this effect + + const calculateMaxLength = () => { + console.log(selectRef); + if (selectRef.current) { + const width = selectRef.current.offsetWidth; + const calculatedMaxLength = Math.floor(width / maxStringLength); + setMaxLength(calculatedMaxLength); + } + }; + calculateMaxLength(); + window.addEventListener("resize", calculateMaxLength); + + return () => { + window.removeEventListener("resize", calculateMaxLength); // Cleanup on unmount + }; + }, [maxStringLength, truncate]); + + // Get the selected item's name + const selectedItemName = truncate + ? items.find((item) => item._id === value)?.name // Only calculate if truncate is true + : null; + return ( )} + renderTruncatedValue(selectedItemName, truncate, maxLength, placeholder) + } > {placeholder && ( {truncateTextWithDottedEnds(displayName, maxLength)} + ) : ( + {displayName} + ); +}; From a7a8bb2ea8dcb717102b6d3f2116ea3fd942f6e5 Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Wed, 5 Mar 2025 09:16:49 +0530 Subject: [PATCH 02/16] removed all console logs. --- src/Components/Inputs/Select/index.jsx | 1 - src/Utils/truncateUtils.jsx | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index f6accc415..ec5f2d012 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -71,7 +71,6 @@ const Select = ({ if (!truncate) return; // If truncate is false, do not run this effect const calculateMaxLength = () => { - console.log(selectRef); if (selectRef.current) { const width = selectRef.current.offsetWidth; const calculatedMaxLength = Math.floor(width / maxStringLength); diff --git a/src/Utils/truncateUtils.jsx b/src/Utils/truncateUtils.jsx index 3bb38e9e2..2474bae4f 100644 --- a/src/Utils/truncateUtils.jsx +++ b/src/Utils/truncateUtils.jsx @@ -21,7 +21,6 @@ export const renderTruncatedValue = function ( maxLength, placeholder ) { - console.log(maxLength); if (isEmpty(displayName)) return placeholder; return truncate ? ( From 3376186ff34ddf533c87763a480eb53ed33a8b86 Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Wed, 5 Mar 2025 09:21:08 +0530 Subject: [PATCH 03/16] Refactored the code. --- src/Components/Inputs/Select/index.jsx | 5 ++--- src/Utils/truncateUtils.jsx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index ec5f2d012..a3d0a5608 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -55,8 +55,8 @@ const Select = ({ truncate = false, maxStringLength = 10, }) => { - const [maxLength, setMaxLength] = useState(0); // Initially set maxLength to 0 - const selectRef = useRef(null); // Reference for the Select container + const [maxLength, setMaxLength] = useState(0); + const selectRef = useRef(null); const theme = useTheme(); const itemStyles = { @@ -85,7 +85,6 @@ const Select = ({ }; }, [maxStringLength, truncate]); - // Get the selected item's name const selectedItemName = truncate ? items.find((item) => item._id === value)?.name // Only calculate if truncate is true : null; diff --git a/src/Utils/truncateUtils.jsx b/src/Utils/truncateUtils.jsx index 2474bae4f..579b71622 100644 --- a/src/Utils/truncateUtils.jsx +++ b/src/Utils/truncateUtils.jsx @@ -1,5 +1,5 @@ // src/utils/truncateUtils.js -import { isEmpty } from "./stringUtils"; // assuming you have the stringUtils file +import { isEmpty } from "./stringUtils"; /** * Utility function to render a truncated value with an optional title. From 14b5cfc053444b06471cae06e086be98c9dcbbda Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Wed, 5 Mar 2025 11:22:45 +0530 Subject: [PATCH 04/16] selectedItemName value to empty --- src/Components/Inputs/Select/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index a3d0a5608..91d08cf18 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -87,7 +87,7 @@ const Select = ({ const selectedItemName = truncate ? items.find((item) => item._id === value)?.name // Only calculate if truncate is true - : null; + : ""; return ( Date: Wed, 5 Mar 2025 21:03:03 +0530 Subject: [PATCH 05/16] Changed the logic to only depend on css styles and typography component. --- src/Components/Inputs/Select/index.jsx | 60 ++++++++----------- .../Components/OptionsHeader/index.jsx | 1 - src/Utils/truncateUtils.jsx | 31 ---------- 3 files changed, 24 insertions(+), 68 deletions(-) delete mode 100644 src/Utils/truncateUtils.jsx diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index 91d08cf18..0d183d4e3 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -4,8 +4,6 @@ import { MenuItem, Select as MuiSelect, Stack, Typography } from "@mui/material" import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown"; import "./index.css"; -import { useEffect, useRef, useState } from "react"; -import { renderTruncatedValue } from "../../../Utils/truncateUtils.jsx"; /** * @component @@ -52,12 +50,8 @@ const Select = ({ sx, name = "", labelControlSpacing = 2, - truncate = false, - maxStringLength = 10, + maxWidthValue = 250, }) => { - const [maxLength, setMaxLength] = useState(0); - const selectRef = useRef(null); - const theme = useTheme(); const itemStyles = { fontSize: "var(--env-var-font-size-medium)", @@ -66,29 +60,6 @@ const Select = ({ margin: theme.spacing(2), }; - // Dynamically adjust maxLength based on window width - useEffect(() => { - if (!truncate) return; // If truncate is false, do not run this effect - - const calculateMaxLength = () => { - if (selectRef.current) { - const width = selectRef.current.offsetWidth; - const calculatedMaxLength = Math.floor(width / maxStringLength); - setMaxLength(calculatedMaxLength); - } - }; - calculateMaxLength(); - window.addEventListener("resize", calculateMaxLength); - - return () => { - window.removeEventListener("resize", calculateMaxLength); // Cleanup on unmount - }; - }, [maxStringLength, truncate]); - - const selectedItemName = truncate - ? items.find((item) => item._id === value)?.name // Only calculate if truncate is true - : ""; - return ( )} - renderTruncatedValue(selectedItemName, truncate, maxLength, placeholder) - } + renderValue={(selected) => { + const selectedItem = items.find((item) => item._id === selected); + const displayName = selectedItem ? selectedItem.name : placeholder; + return ( + + {displayName} + + ); + }} > {placeholder && ( diff --git a/src/Utils/truncateUtils.jsx b/src/Utils/truncateUtils.jsx deleted file mode 100644 index 579b71622..000000000 --- a/src/Utils/truncateUtils.jsx +++ /dev/null @@ -1,31 +0,0 @@ -// src/utils/truncateUtils.js -import { isEmpty } from "./stringUtils"; - -/** - * Utility function to render a truncated value with an optional title. - * @param {string} displayName - The name or text to display. - * @param {number} maxLength - The maximum length of the text. - * @param {string} placeholder - Placeholder text if no value is provided. - * @returns {JSX.Element} - The JSX element for the rendered value. - * - */ - -const truncateTextWithDottedEnds = function (text, maxLength) { - if (!text || text.length <= maxLength) return text; - return `${text.substring(0, maxLength)}...`; -}; - -export const renderTruncatedValue = function ( - displayName, - truncate, - maxLength, - placeholder -) { - if (isEmpty(displayName)) return placeholder; - - return truncate ? ( - {truncateTextWithDottedEnds(displayName, maxLength)} - ) : ( - {displayName} - ); -}; From 5c0c33a339843e69b3574a184ade5da44e5073ba Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Thu, 6 Mar 2025 00:27:37 +0530 Subject: [PATCH 06/16] Made maxwidth to be default 100% and if the number is provided then we truncate. --- src/Components/Inputs/Select/index.jsx | 18 ++++++++++-------- .../Components/OptionsHeader/index.jsx | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index 0d183d4e3..1cb35c19c 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -50,7 +50,7 @@ const Select = ({ sx, name = "", labelControlSpacing = 2, - maxWidthValue = 250, + maxWidth, }) => { const theme = useTheme(); const itemStyles = { @@ -60,6 +60,13 @@ const Select = ({ margin: theme.spacing(2), }; + const responsiveMaxWidth = { + xs: `${maxWidth * 0.5}px`, + sm: `${maxWidth * 0.75}px`, + md: `${maxWidth * 0.9}px`, + lg: `${maxWidth}px`, + }; + return ( From a92839cf4e3afb6b2e0f2aa9906394165554e637 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 5 Mar 2025 19:23:23 -0800 Subject: [PATCH 07/16] new query --- src/Components/Inputs/Select/index.jsx | 17 ++++++++++++++++- .../Area/index.jsx | 2 +- src/Pages/DistributedUptime/Details/index.jsx | 3 +-- .../Monitors/Hooks/useSubscribeToMonitors.jsx | 6 +----- .../DistributedUptimeStatus/Status/index.jsx | 4 ++-- 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index f0a1d11c0..fa6108351 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -83,10 +83,25 @@ const Select = ({ name={name} inputProps={{ id: id }} IconComponent={KeyboardArrowDownIcon} - MenuProps={{ disableScrollLock: true }} + renderValue={(selected) => { + return ( + + {items.find((item) => item._id === selected)?.name} + + ); + }} sx={{ fontSize: 13, + maxWidth: "200px", minWidth: "125px", + "& fieldset": { borderRadius: theme.shape.borderRadius, borderColor: theme.palette.primary.lowContrast, diff --git a/src/Pages/DistributedUptime/Details/Components/DistributedUptimeResponseChart/Area/index.jsx b/src/Pages/DistributedUptime/Details/Components/DistributedUptimeResponseChart/Area/index.jsx index ac6b770ac..1102f72b8 100644 --- a/src/Pages/DistributedUptime/Details/Components/DistributedUptimeResponseChart/Area/index.jsx +++ b/src/Pages/DistributedUptime/Details/Components/DistributedUptimeResponseChart/Area/index.jsx @@ -63,7 +63,7 @@ const DistributedUptimeResponseAreaChart = ({ checks }) => { } minTickGap={0} axisLine={false} diff --git a/src/Pages/DistributedUptime/Details/index.jsx b/src/Pages/DistributedUptime/Details/index.jsx index 24c625c24..420291d22 100644 --- a/src/Pages/DistributedUptime/Details/index.jsx +++ b/src/Pages/DistributedUptime/Details/index.jsx @@ -75,7 +75,6 @@ const DistributedUptimeDetails = () => { ); } - return ( { gap={theme.spacing(8)} > diff --git a/src/Pages/DistributedUptime/Monitors/Hooks/useSubscribeToMonitors.jsx b/src/Pages/DistributedUptime/Monitors/Hooks/useSubscribeToMonitors.jsx index ffca50cd7..3b6c262ba 100644 --- a/src/Pages/DistributedUptime/Monitors/Hooks/useSubscribeToMonitors.jsx +++ b/src/Pages/DistributedUptime/Monitors/Hooks/useSubscribeToMonitors.jsx @@ -25,11 +25,7 @@ const useSubscribeToMonitors = (page, rowsPerPage) => { const initialDataRes = await networkService.getDistributedUptimeMonitors({ teamId: user.teamId, limit: 25, - types: [ - typeof import.meta.env.VITE_DEPIN_TESTING === "undefined" - ? "distributed_http" - : "distributed_test", - ], + types: ["distributed_http"], page, rowsPerPage, }); diff --git a/src/Pages/DistributedUptimeStatus/Status/index.jsx b/src/Pages/DistributedUptimeStatus/Status/index.jsx index b2fb0780f..33bfe6844 100644 --- a/src/Pages/DistributedUptimeStatus/Status/index.jsx +++ b/src/Pages/DistributedUptimeStatus/Status/index.jsx @@ -234,7 +234,7 @@ const DistributedUptimeStatus = () => { direction={{ s: "column", md: "row" }} > { /> Date: Wed, 5 Mar 2025 19:35:34 -0800 Subject: [PATCH 08/16] add explain results --- .../DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx b/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx index e8a49e886..200257e12 100644 --- a/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx +++ b/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx @@ -36,6 +36,9 @@ const useSubscribeToDetails = ({ monitorId, isPublic, isPublished, dateRange }) setConnectionStatus("up"); setLastUpdateTrigger(Date.now()); setMonitor(responseData); + if (responseData.explainResults) { + console.log(responseData.explainResults); + } } catch (error) { setNetworkError(true); setConnectionStatus("down"); From ad44f34eabf8a758abd9821025e9da10768e0fd6 Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Thu, 6 Mar 2025 14:05:15 +0530 Subject: [PATCH 09/16] Refactored with comments for better understanding. --- src/Components/Inputs/Select/index.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index 1cb35c19c..2aa979434 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -18,6 +18,7 @@ import "./index.css"; * @param {string} props.items.name - The display name of each item. * @param {function} props.onChange - The function to handle onChange event. * @param {object} props.sx - The custom styles object for MUI Select component. + * @param {number} props.maxWidth - Maximum width in pixels for the select component. Enables responsive text truncation. * @returns {JSX.Element} * * @example @@ -171,6 +172,10 @@ Select.propTypes = { onBlur: PropTypes.func, sx: PropTypes.object, labelControlSpacing: PropTypes.number, + /** + * Maximum width in pixels. Used to control text truncation and element width. + * Responsive breakpoints will be calculated as percentages of this value. + */ maxWidth: PropTypes.number, }; From 23b22fad38e8c291e44bb1fac5cab8952feb6c7e Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 6 Mar 2025 09:13:09 -0800 Subject: [PATCH 10/16] fix chart ID --- .../Components/DistributedUptimeResponseChart/Bar/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pages/DistributedUptime/Details/Components/DistributedUptimeResponseChart/Bar/index.jsx b/src/Pages/DistributedUptime/Details/Components/DistributedUptimeResponseChart/Bar/index.jsx index 6b013c29f..a6d3d455b 100644 --- a/src/Pages/DistributedUptime/Details/Components/DistributedUptimeResponseChart/Bar/index.jsx +++ b/src/Pages/DistributedUptime/Details/Components/DistributedUptimeResponseChart/Bar/index.jsx @@ -67,7 +67,7 @@ const DistributedUptimeResponseBarChart = ({ checks }) => { /> } minTickGap={0} axisLine={false} From 995bd644e5245f9a7e5c5fa07f8462bd3e8b965b Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 6 Mar 2025 09:31:41 -0800 Subject: [PATCH 11/16] add map checks --- src/Pages/DistributedUptime/Details/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pages/DistributedUptime/Details/index.jsx b/src/Pages/DistributedUptime/Details/index.jsx index 420291d22..6e84240aa 100644 --- a/src/Pages/DistributedUptime/Details/index.jsx +++ b/src/Pages/DistributedUptime/Details/index.jsx @@ -113,7 +113,7 @@ const DistributedUptimeDetails = () => { gap={theme.spacing(8)} > From d447231780393f1acc8980def8dc5b40258a5e07 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 6 Mar 2025 09:35:44 -0800 Subject: [PATCH 12/16] revert status page --- src/Pages/DistributedUptimeStatus/Status/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pages/DistributedUptimeStatus/Status/index.jsx b/src/Pages/DistributedUptimeStatus/Status/index.jsx index 33bfe6844..515bd9be5 100644 --- a/src/Pages/DistributedUptimeStatus/Status/index.jsx +++ b/src/Pages/DistributedUptimeStatus/Status/index.jsx @@ -234,7 +234,7 @@ const DistributedUptimeStatus = () => { direction={{ s: "column", md: "row" }} > Date: Thu, 6 Mar 2025 09:39:58 -0800 Subject: [PATCH 13/16] remove diagnostic --- .../DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx b/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx index 200257e12..e8a49e886 100644 --- a/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx +++ b/src/Pages/DistributedUptime/Details/Hooks/useSubscribeToDetails.jsx @@ -36,9 +36,6 @@ const useSubscribeToDetails = ({ monitorId, isPublic, isPublished, dateRange }) setConnectionStatus("up"); setLastUpdateTrigger(Date.now()); setMonitor(responseData); - if (responseData.explainResults) { - console.log(responseData.explainResults); - } } catch (error) { setNetworkError(true); setConnectionStatus("down"); From e8fe3ceee3f5a47dabf667cb464955dc4e6053e4 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 6 Mar 2025 09:48:10 -0800 Subject: [PATCH 14/16] reset --- src/Components/Inputs/Select/index.jsx | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/Components/Inputs/Select/index.jsx b/src/Components/Inputs/Select/index.jsx index fa6108351..f0a1d11c0 100644 --- a/src/Components/Inputs/Select/index.jsx +++ b/src/Components/Inputs/Select/index.jsx @@ -83,25 +83,10 @@ const Select = ({ name={name} inputProps={{ id: id }} IconComponent={KeyboardArrowDownIcon} - renderValue={(selected) => { - return ( - - {items.find((item) => item._id === selected)?.name} - - ); - }} + MenuProps={{ disableScrollLock: true }} sx={{ fontSize: 13, - maxWidth: "200px", minWidth: "125px", - "& fieldset": { borderRadius: theme.shape.borderRadius, borderColor: theme.palette.primary.lowContrast, From 37958d7307313b62c1982f248699f2b48c5e9f03 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 6 Mar 2025 12:04:49 -0800 Subject: [PATCH 15/16] refactor to use monitor-stats --- .../DistributedUptimeResponseChart/Helpers/ToolTip.jsx | 2 +- .../Details/Components/StatBoxes/index.jsx | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Pages/DistributedUptime/Details/Components/DistributedUptimeResponseChart/Helpers/ToolTip.jsx b/src/Pages/DistributedUptime/Details/Components/DistributedUptimeResponseChart/Helpers/ToolTip.jsx index db8cb3890..064678897 100644 --- a/src/Pages/DistributedUptime/Details/Components/DistributedUptimeResponseChart/Helpers/ToolTip.jsx +++ b/src/Pages/DistributedUptime/Details/Components/DistributedUptimeResponseChart/Helpers/ToolTip.jsx @@ -75,7 +75,7 @@ CustomToolTip.propTypes = { PropTypes.shape({ value: PropTypes.number, payload: PropTypes.shape({ - _id: PropTypes.string, + _id: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), avgResponseTime: PropTypes.number, originalAvgResponseTime: PropTypes.number, }), diff --git a/src/Pages/DistributedUptime/Details/Components/StatBoxes/index.jsx b/src/Pages/DistributedUptime/Details/Components/StatBoxes/index.jsx index ffc8dbac8..0cdd3f01d 100644 --- a/src/Pages/DistributedUptime/Details/Components/StatBoxes/index.jsx +++ b/src/Pages/DistributedUptime/Details/Components/StatBoxes/index.jsx @@ -9,6 +9,11 @@ import PropTypes from "prop-types"; const StatBoxes = ({ monitor, lastUpdateTrigger }) => { const theme = useTheme(); + let timeSinceLastCheck = 0; + + if (monitor?.lastCheckTimestamp) { + timeSinceLastCheck = Date.now() - monitor?.lastCheckTimestamp; + } return ( { heading={"Last check"} subHeading={ } From dce8cf6ad53baa65f1c95927cc873b80a680ea65 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 6 Mar 2025 13:54:04 -0800 Subject: [PATCH 16/16] use simplified map query --- .../Details/Components/DistributedUptimeMap/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pages/DistributedUptime/Details/Components/DistributedUptimeMap/index.jsx b/src/Pages/DistributedUptime/Details/Components/DistributedUptimeMap/index.jsx index 858eaab78..03993dcc3 100644 --- a/src/Pages/DistributedUptime/Details/Components/DistributedUptimeMap/index.jsx +++ b/src/Pages/DistributedUptime/Details/Components/DistributedUptimeMap/index.jsx @@ -75,7 +75,7 @@ const DistributedUptimeMap = ({ type: "Feature", geometry: { type: "Point", - coordinates: [check.lng, check.lat], + coordinates: [check._id.lng, check._id.lat], }, properties: { color: theme.palette.accent.main,