File tree Expand file tree Collapse file tree
packages/new-polymath-issuer/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ export class CheckpointListContainerBase extends Component<Props> {
125125
126126 return (
127127 < CheckpointListPresenter
128+ hasDividends = { ! ! Object . keys ( dividendsData ) . length }
128129 allDividendsCompleted = { allDividendsCompleted }
129130 checkpoints = { sortedCheckpoints }
130131 securityTokenSymbol = { securityTokenSymbol }
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ export interface Props {
2020 securityTokenSymbol : string ;
2121 downloadOwnershipList : ( checkpoint : types . CheckpointEntity ) => void ;
2222 allDividendsCompleted : boolean ;
23+ hasDividends : boolean ;
2324 loading ?: boolean ;
2425}
2526
@@ -28,6 +29,7 @@ export const CheckpointListPresenter = ({
2829 securityTokenSymbol,
2930 downloadOwnershipList,
3031 allDividendsCompleted,
32+ hasDividends,
3133 loading,
3234} : Props ) => {
3335 const checkpointsByYear = groupBy ( checkpoints , checkpoint =>
@@ -95,6 +97,7 @@ export const CheckpointListPresenter = ({
9597 />
9698 </ sc . ProgressIndicator >
9799 < DividendList
100+ hasDividends = { hasDividends }
98101 allDividendsCompleted = { allDividendsCompleted }
99102 checkpointIndex = { checkpoint . index }
100103 securityTokenSymbol = { securityTokenSymbol }
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export interface Props {
1111 securityTokenSymbol : string ;
1212 checkpointIndex : number ;
1313 allDividendsCompleted : boolean ;
14+ hasDividends : boolean ;
1415}
1516
1617export class DividendListContainerBase extends Component < Props > {
@@ -19,6 +20,7 @@ export class DividendListContainerBase extends Component<Props> {
1920 securityTokenSymbol,
2021 checkpointIndex,
2122 allDividendsCompleted,
23+ hasDividends,
2224 } = this . props ;
2325 return (
2426 < DataFetcher
@@ -37,6 +39,7 @@ export class DividendListContainerBase extends Component<Props> {
3739 return (
3840 < DividendListPresenter
3941 securityTokenSymbol = { securityTokenSymbol }
42+ hasDividends = { hasDividends }
4043 dividends = { sortedDividends }
4144 checkpointIndex = { checkpointIndex }
4245 allDividendsCompleted = { allDividendsCompleted }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { DividendCard } from '~/components/DividendCard';
1313import * as sc from './styles' ;
1414
1515export interface Props {
16+ hasDividends : boolean ;
1617 dividends : types . DividendEntity [ ] ;
1718 securityTokenSymbol : string ;
1819 checkpointIndex : number ;
@@ -23,9 +24,10 @@ export const DividendListPresenter: FC<Props> = ({
2324 securityTokenSymbol,
2425 dividends,
2526 checkpointIndex,
27+ allDividendsCompleted,
28+ hasDividends,
2629} ) => {
27- const allDividendsCompleted = false ;
28- const NewDividendButton = dividends . length
30+ const NewDividendButton = hasDividends
2931 ? sc . NewDividendButton
3032 : sc . PlaceholderButton ;
3133
You can’t perform that action at this time.
0 commit comments