Remove Zeip type, use zeip id in governance page CTA

This commit is contained in:
fragosti
2019-07-01 13:57:02 -07:00
committed by Jacob Evans
parent 590055e2ba
commit dfb79e0998
5 changed files with 7 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
import { BigNumber } from '@0x/utils';
import * as moment from 'moment';
import { TallyInterface, VoteOutcome, ZeipId } from 'ts/types';
import { TallyInterface, VoteOutcome } from 'ts/types';
export interface ProposalLink {
text: string;
@@ -16,7 +16,7 @@ export interface ProposalProperty {
}
export interface Proposal {
zeipId: ZeipId;
zeipId: number;
title: string;
summary: string;
url: string;

View File

@@ -149,7 +149,7 @@ export class Governance extends React.Component<RouteComponentProps<any>> {
</Section>
<Banner
heading="Vote with ZRX on ZEIP-23"
heading={`Vote with ZRX on ZEIP-${this._proposalData.zeipId}`}
subline="Use 0x Instant to quickly purchase ZRX for voting"
mainCta={{ text: 'Get ZRX', onClick: this._onLaunchInstantClick.bind(this) }}
secondaryCta={{ text: 'Vote', onClick: this._onOpenVoteModal.bind(this) }}

View File

@@ -12,7 +12,7 @@ import { VoteIndexCard } from 'ts/pages/governance/vote_index_card';
import { TallyInterface } from 'ts/types';
import { documentConstants } from 'ts/utils/document_meta_constants';
const ZEIP_IDS = [23, 39, 24, 25];
const ZEIP_IDS = Object.keys(proposals).map(idString => parseInt(idString, 10));
const ZEIP_PROPOSALS: Proposal[] = ZEIP_IDS.map(id => proposals[id]).sort(
(a, b) => b.voteStartDate.unix() - a.voteStartDate.unix(),
);

View File

@@ -8,11 +8,11 @@ import { Column, FlexWrap, Section } from 'ts/components/newLayout';
import { Heading, Paragraph } from 'ts/components/text';
import { getTotalBalancesString } from 'ts/pages/governance/vote_stats';
import { VoteStatusText } from 'ts/pages/governance/vote_status_text';
import { TallyInterface, VoteOutcome, VoteTime, ZeipId } from 'ts/types';
import { TallyInterface, VoteOutcome, VoteTime } from 'ts/types';
export interface VoteIndexCardProps {
title: string;
zeipId: ZeipId;
zeipId: number;
summary: string;
voteStartDate: moment.Moment;
voteEndDate: moment.Moment;

View File

@@ -769,10 +769,9 @@ export interface Package {
export type VoteOutcome = 'accepted' | 'rejected';
export type VoteTime = 'upcoming' | 'happening';
export type VoteStatus = VoteOutcome | VoteTime;
export type ZeipId = 39 | 24 | 23 | 25;
export interface TallyInterface {
zeipId?: ZeipId;
zeipId?: number;
yes?: BigNumber;
no?: BigNumber;
blockNumber?: string;