diff --git a/src/components/address/address-view.tsx b/src/components/address/address-view.tsx index 935f84b..4c32653 100644 --- a/src/components/address/address-view.tsx +++ b/src/components/address/address-view.tsx @@ -262,7 +262,10 @@ export default function AddressView({ addresses }: { addresses: string }) { {/* Priority 3: Heavy charts with lazy loading and Suspense */} }> - + diff --git a/src/components/address/charts/cumulative-rewards-chart.tsx b/src/components/address/charts/cumulative-rewards-chart.tsx index 02cd6c9..e41e588 100644 --- a/src/components/address/charts/cumulative-rewards-chart.tsx +++ b/src/components/address/charts/cumulative-rewards-chart.tsx @@ -27,8 +27,10 @@ type ChartData = { const CumulativeRewardsChart = React.memo(function CumulativeRewardsChart({ blocks, + hideBalance, }: { blocks: MinimalBlock[]; + hideBalance?: boolean; }) { const { theme } = useTheme(); const isSmall = useIsSmallScreen(640); @@ -237,6 +239,7 @@ const CumulativeRewardsChart = React.memo(function CumulativeRewardsChart({ key="cumulative" microAlgoAmount={dataPoint.cumulativeRewards} showAnimation={false} + hidden={hideBalance} />, "Total Rewards", ]; @@ -247,6 +250,7 @@ const CumulativeRewardsChart = React.memo(function CumulativeRewardsChart({ key="daily" microAlgoAmount={dataPoint.dailyRewards} showAnimation={false} + hidden={hideBalance} />, "Daily Rewards", ]; diff --git a/src/components/address/stats/panels/blocks-per-day-panel.tsx b/src/components/address/stats/panels/blocks-per-day-panel.tsx index 3da39e7..b093e77 100644 --- a/src/components/address/stats/panels/blocks-per-day-panel.tsx +++ b/src/components/address/stats/panels/blocks-per-day-panel.tsx @@ -32,9 +32,11 @@ function PreviousBlocksTooltip({ export function BlocksPerDayPanel({ stats, loading, + hideBalance, }: { stats: BlockStats; loading: boolean; + hideBalance?: boolean; }) { return ( @@ -46,7 +48,10 @@ export function BlocksPerDayPanel({ content={ - + {stats.allTime.startDate !== null && @@ -65,6 +70,7 @@ export function BlocksPerDayPanel({ @@ -84,7 +90,10 @@ export function BlocksPerDayPanel({
- + {`${stats.last30Days.totalBlocks} blocks proposed from ${stats.last30Days.startDate.toLocaleString()} to ${stats.last30Days.endDate.toLocaleString()}`} @@ -113,7 +122,10 @@ export function BlocksPerDayPanel({
- + {`${stats.last7Days.totalBlocks} blocks proposed from ${stats.last7Days.startDate.toLocaleDateString()} to ${stats.last7Days.endDate.toLocaleDateString()}`} diff --git a/src/components/address/stats/panels/rewards-per-day-panel.tsx b/src/components/address/stats/panels/rewards-per-day-panel.tsx index 35650f8..1da4b27 100644 --- a/src/components/address/stats/panels/rewards-per-day-panel.tsx +++ b/src/components/address/stats/panels/rewards-per-day-panel.tsx @@ -43,9 +43,11 @@ function PreviousRewardTooltip({ export function RewardsPerDayPanel({ stats, loading, + hideBalance, }: { stats: BlockStats; loading: boolean; + hideBalance?: boolean; }) { return ( @@ -59,6 +61,7 @@ export function RewardsPerDayPanel({ @@ -68,6 +71,7 @@ export function RewardsPerDayPanel({ showAnimation={false} showUsdValue={false} microAlgoAmount={stats.allTime.totalRewards} + hidden={hideBalance} /> {` rewarded in ${stats.allTime.totalDays} days (from ${stats.allTime.startDate.toLocaleDateString()} to ${stats.allTime.endDate.toLocaleDateString()})`} @@ -87,6 +91,7 @@ export function RewardsPerDayPanel({ microAlgoAmount={ stats.allTime.avgRewardsPerDay * AVERAGE_DAY_IN_MONTH } + hidden={hideBalance} /> @@ -96,6 +101,7 @@ export function RewardsPerDayPanel({ showAnimation={false} showUsdValue={false} microAlgoAmount={stats.allTime.avgRewardsPerDay} + hidden={hideBalance} /> {` by day x ${AVERAGE_DAY_IN_MONTH} days in a month (365/12)`} @@ -114,6 +120,7 @@ export function RewardsPerDayPanel({ @@ -121,6 +128,7 @@ export function RewardsPerDayPanel({ showAnimation={false} showUsdValue={false} microAlgoAmount={stats.last30Days.totalRewards} + hidden={hideBalance} />{" "} {`rewarded from ${stats.last30Days.startDate.toLocaleDateString()} to ${stats.last30Days.endDate.toLocaleDateString()}`} @@ -151,6 +159,7 @@ export function RewardsPerDayPanel({ @@ -158,6 +167,7 @@ export function RewardsPerDayPanel({ showUsdValue={false} showAnimation={false} microAlgoAmount={stats.last7Days.totalRewards} + hidden={hideBalance} />{" "} {`rewarded from ${stats.last7Days.startDate.toLocaleDateString()} to ${stats.last7Days.endDate.toLocaleDateString()}`} diff --git a/src/components/address/stats/panels/total-panel.tsx b/src/components/address/stats/panels/total-panel.tsx index a58e19c..4786a81 100644 --- a/src/components/address/stats/panels/total-panel.tsx +++ b/src/components/address/stats/panels/total-panel.tsx @@ -8,9 +8,11 @@ import { Panel } from "../panel"; export function TotalsPanel({ stats, loading, + hideBalance, }: { stats: BlockStats; loading: boolean; + hideBalance?: boolean; }) { return ( @@ -19,13 +21,23 @@ export function TotalsPanel({ title="Total rewards" loading={loading} skeletonLines={2} - content={} + content={ +