Skip to content

Commit 0b1e3ea

Browse files
committed
chore(new-issuer): show right new dividends btn based on Stan feedback
1 parent a76057b commit 0b1e3ea

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

packages/new-polymath-issuer/src/components/CheckpointList/Container.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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}

packages/new-polymath-issuer/src/components/CheckpointList/Presenter.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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}

packages/new-polymath-issuer/src/components/DividendList/Container.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export interface Props {
1111
securityTokenSymbol: string;
1212
checkpointIndex: number;
1313
allDividendsCompleted: boolean;
14+
hasDividends: boolean;
1415
}
1516

1617
export 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}

packages/new-polymath-issuer/src/components/DividendList/Presenter.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { DividendCard } from '~/components/DividendCard';
1313
import * as sc from './styles';
1414

1515
export 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

0 commit comments

Comments
 (0)