kopia lustrzana https://github.com/bugout-dev/moonstream
Merge pull request #533 from bugout-dev/fix-dashboards-crashing
added few checks for undefined before mappull/535/head
commit
f65c9ea0e2
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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}
|
||||
|
|
Ładowanie…
Reference in New Issue