diff --git a/packages/protocol-dashboard/src/components/TotalApiCallsChart/TotalApiCallsChart.tsx b/packages/protocol-dashboard/src/components/TotalApiCallsChart/TotalApiCallsChart.tsx index 667d0112269..a0585dcec88 100644 --- a/packages/protocol-dashboard/src/components/TotalApiCallsChart/TotalApiCallsChart.tsx +++ b/packages/protocol-dashboard/src/components/TotalApiCallsChart/TotalApiCallsChart.tsx @@ -2,6 +2,7 @@ import LineChart from 'components/LineChart' import React, { useState } from 'react' import { useApiCalls } from 'store/cache/analytics/hooks' import { Bucket, MetricError } from 'store/cache/analytics/slice' +import { datesToSkip } from 'utils/consts' type OwnProps = {} @@ -17,8 +18,14 @@ const TotalApiCallsChart: React.FC = props => { labels = [] data = [] } else { - labels = apiCalls?.map(a => new Date(a.timestamp).getTime() / 1000) ?? null - data = apiCalls?.map(a => a.total_count) ?? null + labels = + apiCalls + ?.filter(a => !datesToSkip.has(a.timestamp)) + ?.map(a => new Date(a.timestamp).getTime() / 1000) ?? null + data = + apiCalls + ?.filter(a => !datesToSkip.has(a.timestamp)) + ?.map(a => a.total_count) ?? null } return ( = props => { data={data} labels={labels} selection={bucket} - options={[Bucket.ALL_TIME, Bucket.MONTH, Bucket.WEEK]} + options={[Bucket.ALL_TIME, Bucket.MONTH]} onSelectOption={(option: string) => setBucket(option as Bucket)} showLeadingDay /> diff --git a/packages/protocol-dashboard/src/components/UniqueUsersChart/UniqueUsersChart.tsx b/packages/protocol-dashboard/src/components/UniqueUsersChart/UniqueUsersChart.tsx index f119d8ddb0e..4dc82a27bc5 100644 --- a/packages/protocol-dashboard/src/components/UniqueUsersChart/UniqueUsersChart.tsx +++ b/packages/protocol-dashboard/src/components/UniqueUsersChart/UniqueUsersChart.tsx @@ -2,6 +2,7 @@ import LineChart from 'components/LineChart' import React, { useState } from 'react' import { useApiCalls } from 'store/cache/analytics/hooks' import { Bucket, MetricError } from 'store/cache/analytics/slice' +import { datesToSkip } from 'utils/consts' type OwnProps = {} @@ -17,8 +18,14 @@ const UniqueUsersChart: React.FC = () => { labels = [] data = [] } else { - labels = apiCalls?.map(a => new Date(a.timestamp).getTime() / 1000) ?? null - data = apiCalls?.map(a => a.summed_unique_count) ?? null + labels = + apiCalls + ?.filter(a => !datesToSkip.has(a.timestamp)) + ?.map(a => new Date(a.timestamp).getTime() / 1000) ?? null + data = + apiCalls + ?.filter(a => !datesToSkip.has(a.timestamp)) + ?.map(a => a.summed_unique_count) ?? null } return ( = () => { labels={labels} selection={bucket} error={error} - options={[Bucket.ALL_TIME, Bucket.MONTH, Bucket.WEEK]} + options={[Bucket.ALL_TIME, Bucket.MONTH]} onSelectOption={(option: string) => setBucket(option as Bucket)} showLeadingDay /> diff --git a/packages/protocol-dashboard/src/utils/consts.ts b/packages/protocol-dashboard/src/utils/consts.ts index 7e8f9871dd5..7a45487894d 100644 --- a/packages/protocol-dashboard/src/utils/consts.ts +++ b/packages/protocol-dashboard/src/utils/consts.ts @@ -1 +1,14 @@ export const TICKER = '$AUDIO' + +export const datesToSkip = new Set([ + '2023-06-23', + '2023-06-24', + '2023-06-25', + '2023-06-29', + '2023-06-30', + '2023-07-01', + '2023-07-02', + '2023-07-03', + '2023-07-04', + '2023-07-05' +])