diff --git a/src/components/v5/common/ActionSidebar/partials/forms/PaymentBuilderForm/partials/PaymentBuilderPayoutsTotal/PaymentBuilderPayoutsTotal.tsx b/src/components/v5/common/ActionSidebar/partials/forms/PaymentBuilderForm/partials/PaymentBuilderPayoutsTotal/PaymentBuilderPayoutsTotal.tsx index 1e869a29603..fc86a78ccc8 100644 --- a/src/components/v5/common/ActionSidebar/partials/forms/PaymentBuilderForm/partials/PaymentBuilderPayoutsTotal/PaymentBuilderPayoutsTotal.tsx +++ b/src/components/v5/common/ActionSidebar/partials/forms/PaymentBuilderForm/partials/PaymentBuilderPayoutsTotal/PaymentBuilderPayoutsTotal.tsx @@ -89,7 +89,7 @@ const PaymentBuilderTokensTotal: FC = ({ )} > -
+
formatText({ id: 'table.row.amount' }), cell: ({ row }) => ( 1; - const isMobile = useMobile(); + const isTablet = useTablet(); const { stagedExpenditureAddress } = useEnabledExtensions(); const hasMoreThanOneMilestone = dataRef.current.filter((item) => !item.isClaimed).length > 1; @@ -68,6 +68,17 @@ const useStagedPaymentTableColumns = ({ const columnHelper = createColumnHelper(); + const releaseTableSpacer = isTablet + ? [] + : [ + columnHelper.display({ + id: 'release', + staticSize: '60px', + enableSorting: false, + cell: () => null, + }), + ]; + return [ columnHelper.accessor('milestone', { header: () => formatText({ id: 'table.row.milestone' }), @@ -101,7 +112,7 @@ const useStagedPaymentTableColumns = ({ : undefined, }), columnHelper.accessor('amount', { - staticSize: '180px', + staticSize: '210px', enableSorting: false, header: () => formatText({ id: 'table.row.amount' }), cell: ({ row }) => ( @@ -112,29 +123,31 @@ const useStagedPaymentTableColumns = ({ isLoading={isLoading} /> ), - footer: hasMoreThanOneToken - ? () => ( - <> - - {isMobile && - isPaymentStep && - hasMoreThanOneMilestone && - isCorrectExtensionInstalled && ( - - )} - - ) - : undefined, + ...((!isTablet || !isPaymentStep) && { + footer: hasMoreThanOneToken + ? () => { + return ( +
+ +
+ ); + } + : undefined, + }), }), ...(isPaymentStep ? [ columnHelper.display({ id: 'release', - staticSize: '96px', + staticSize: '60px', enableSorting: false, cell: ({ row }) => { const { original } = row; @@ -144,7 +157,11 @@ const useStagedPaymentTableColumns = ({ const isClaimed = currentMilestone?.isClaimed; return isClaimed ? ( -
+
{isCorrectExtensionInstalled ? ( -
+
); }, - footer: - !isMobile && - hasMoreThanOneMilestone && - isCorrectExtensionInstalled - ? () => - : undefined, + ...(hasMoreThanOneToken && { + footer: + hasMoreThanOneMilestone && isCorrectExtensionInstalled + ? () => ( +
+ {isTablet && ( +
+ +
+ )} + + +
+ ) + : () => + isTablet ? ( +
+ {isTablet && ( +
+ +
+ )} +
+ ) : undefined, + }), }), ] - : []), + : releaseTableSpacer), ]; // eslint-disable-next-line react-hooks/exhaustive-deps }, [ hasMoreThanOneToken, isPaymentStep, - isMobile, hasMoreThanOneMilestone, isCorrectExtensionInstalled, isLoading, @@ -194,6 +245,7 @@ const useStagedPaymentTableColumns = ({ // Even though this is not directly used, it is needed to refresh the ReleaseButton isPendingStagesRelease, allMilestonesSlotIdsAwaitingRelease.length, + isTablet, ]); return columns;