diff --git a/packages/page-staking/src/Actions/index.tsx b/packages/page-staking/src/Actions/index.tsx index 9e5eaf3d2e..36c13eec38 100644 --- a/packages/page-staking/src/Actions/index.tsx +++ b/packages/page-staking/src/Actions/index.tsx @@ -5,6 +5,7 @@ import { ActiveEraInfo, EraIndex } from '@polkadot/types/interfaces'; import React, { useCallback, useEffect, useState } from 'react'; +import { Trans } from 'react-i18next'; import { Table } from '@polkadot/react-components'; import { useCall, useApi, useOwnStashes } from '@polkadot/react-hooks'; import { Option } from '@polkadot/types'; @@ -81,6 +82,9 @@ function Actions ({ allStashes, className, isInElection, next, validators }: Pro /> ))} + {api.query.staking.activeEra && ( + All applicable account payouts are now available on the Payouts tab + )} ); } diff --git a/packages/page-staking/src/Payouts/index.tsx b/packages/page-staking/src/Payouts/index.tsx index 2e9eb5886c..8e7951e014 100644 --- a/packages/page-staking/src/Payouts/index.tsx +++ b/packages/page-staking/src/Payouts/index.tsx @@ -109,6 +109,7 @@ function Payouts ({ className, isInElection }: Props): React.ReactElement { +function Body ({ children, className, empty, emptySpinner }: Props): React.ReactElement { return ( {children || ( )} diff --git a/packages/react-components/src/Table/index.tsx b/packages/react-components/src/Table/index.tsx index b271ad9516..ad5b612e0c 100644 --- a/packages/react-components/src/Table/index.tsx +++ b/packages/react-components/src/Table/index.tsx @@ -12,6 +12,7 @@ interface TableProps { children: React.ReactNode; className?: string; empty?: React.ReactNode; + emptySpinner?: React.ReactNode; filter?: React.ReactNode; header: [React.ReactNode?, string?, number?, (() => void)?][]; isFixed?: boolean; @@ -28,7 +29,7 @@ function extractKids (children: React.ReactNode): [boolean, React.ReactNode] { return [isEmpty, isEmpty ? null : kids]; } -function Table ({ children, className, empty, filter, header, isFixed }: TableProps): React.ReactElement { +function Table ({ children, className, empty, emptySpinner, filter, header, isFixed }: TableProps): React.ReactElement { const [isEmpty, kids] = extractKids(children); return ( @@ -39,7 +40,10 @@ function Table ({ children, className, empty, filter, header, isFixed }: TablePr header={header} isEmpty={isEmpty} /> - + {kids}
{ isString(empty) ?
{empty}
- : empty || + : empty || }