diff --git a/nym-wallet/src/components/Rewards/RewardsSummary.tsx b/nym-wallet/src/components/Rewards/RewardsSummary.tsx
index c6e48b395c..75f7da4a7b 100644
--- a/nym-wallet/src/components/Rewards/RewardsSummary.tsx
+++ b/nym-wallet/src/components/Rewards/RewardsSummary.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { CircularProgress, Stack, Typography } from '@mui/material';
+import { CircularProgress, Stack, StackProps, Typography, useMediaQuery } from '@mui/material';
import { useTheme } from '@mui/material/styles';
import { useDelegationContext } from 'src/context/delegations';
import { InfoTooltip } from '../InfoToolTip';
@@ -9,34 +9,63 @@ export const RewardsSummary: FCWithChildren<{
totalDelegation?: string;
totalRewards?: string;
}> = ({ isLoading, totalDelegation, totalRewards }) => {
- const theme = useTheme();
-
const { totalDelegationsAndRewards } = useDelegationContext();
return (
-
-
- Total delegations:
-
- {isLoading ? : totalDelegationsAndRewards || '-'}
-
-
-
-
- Original delegations:
-
- {isLoading ? : totalDelegation || '-'}
-
-
-
-
- Total rewards:
-
- {isLoading ? : totalRewards || '-'}
-
-
+
+ }
+ />
+ }
+ />
+
+ }
+ />
);
};
+
+const RewardSummaryField = ({
+ title,
+ value,
+ Tooltip,
+ isLoading,
+}: {
+ title: string;
+ value: string;
+ Tooltip?: React.ReactNode;
+ isLoading?: boolean;
+}) => {
+ const breakpoint = useMediaQuery(useTheme().breakpoints.down('xl'));
+ const alignProps: { gap: number; direction: StackProps['direction'] } = {
+ gap: breakpoint ? 0 : 1,
+ direction: breakpoint ? 'column' : 'row',
+ };
+
+ return (
+
+
+ {Tooltip}
+ {title}:
+
+
+ {isLoading ? : value}
+
+
+ );
+};