diff --git a/nym-wallet/src/components/Rewards/RewardsSummary.tsx b/nym-wallet/src/components/Rewards/RewardsSummary.tsx index 75f7da4a7b..2ecd236c5b 100644 --- a/nym-wallet/src/components/Rewards/RewardsSummary.tsx +++ b/nym-wallet/src/components/Rewards/RewardsSummary.tsx @@ -4,6 +4,36 @@ import { useTheme } from '@mui/material/styles'; import { useDelegationContext } from 'src/context/delegations'; import { InfoTooltip } from '../InfoToolTip'; +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} + + + ); +}; + export const RewardsSummary: FCWithChildren<{ isLoading?: boolean; totalDelegation?: string; @@ -39,33 +69,3 @@ export const RewardsSummary: FCWithChildren<{ ); }; - -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} - - - ); -};