added few checks for undefined before map

pull/533/head
Tim Pechersky 2022-01-20 19:10:15 +00:00
rodzic b53a560e39
commit 18f5dba46d
3 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -178,7 +178,7 @@ const Analytics = () => {
<Flex w="100%" direction="row" flexWrap="wrap-reverse" id="container">
<>
{Object.keys(dashboardLinksCache.data.data).map((key) => {
{Object.keys(dashboardLinksCache.data.data)?.map((key) => {
const s3PresignedURLs = dashboardLinksCache.data.data[key];
const name = subscriptionsCache.data.subscriptions.find(
(subscription) => subscription.id === key

Wyświetl plik

@ -2,6 +2,7 @@ import React from "react";
import { ResponsiveLineCanvas } from "@nivo/line";
const Report = ({ data, timeRange }) => {
if (!data) return "there is no data to show";
const commonProperties = {
animate: false,
enableSlices: "x",

Wyświetl plik

@ -114,7 +114,7 @@ const SubscriptionReport = ({
flexWrap="wrap"
alignContent={["inherit", "flex-start", null]}
>
{data?.web3_metric.map((metric, web3MetricIndex) => {
{data?.web3_metric?.map((metric, web3MetricIndex) => {
return (
<Flex
flexGrow={1}