Merge pull request #533 from bugout-dev/fix-dashboards-crashing

added few checks for undefined before map
pull/535/head
Tim Pechersky 2022-01-20 21:58:37 +00:00 zatwierdzone przez GitHub
commit f65c9ea0e2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
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}