diff --git a/app/components/AgendaCard.js b/app/components/AgendaCard.js index 3bd9d02b4c..6e6d45112f 100644 --- a/app/components/AgendaCard.js +++ b/app/components/AgendaCard.js @@ -1,47 +1,34 @@ -// @flow import React from "react"; import "../style/AgendaCard.less"; // Currently removing percent progress until a solution to populate is found //
XX%
// should go UNDER agendaCarBottomCfg div -class AgendaCard extends React.Component { - - render() { - let agendaCardProps; - if(!this.props.agenda.finished) { - agendaCardProps = { className: "agenda-card", onClick: this.props.onClick }; - } else { - agendaCardProps = { className: "agenda-card-disabled" }; - } - - return ( -
-
- {this.renderIndicator()} -
- {this.props.agenda.getDescription()} Agenda ID: {this.props.agenda.getId()} -
-
-
-
{this.props.agenda.getId()}
-
- Preference: {this.props.selectedChoice} -
-
+const AgendaCard = ({ + agenda, onClick, selectedChoice +}) => ( +
+
+ {agenda.finished ? ( +
Finished
+ ) : ( +
In Progress
+ )} +
+ {agenda.getDescription()} Agenda ID: {agenda.getId()}
- ); - } - - renderIndicator() { - if(this.props.agenda.finished) { - return
Finished
; - } - else { - return
In Progress
; - } - } - -} +
+
+
{agenda.getId()}
+
+ Preference: {selectedChoice} +
+
+
+); export default AgendaCard; diff --git a/app/components/AgendaClose.js b/app/components/AgendaClose.js index 7361069d32..d11fde38c1 100644 --- a/app/components/AgendaClose.js +++ b/app/components/AgendaClose.js @@ -1,14 +1,8 @@ -// @flow import React from "react"; import "../style/AgendaCard.less"; -class AgendaClose extends React.Component { - render() { - return ( - - ); - - } -} +const AgendaClose = ({ onClick }) => ( + +); export default AgendaClose; diff --git a/app/components/AutoBuyerSwitch.js b/app/components/AutoBuyerSwitch.js index 9dd87decb4..2e8724f2c0 100644 --- a/app/components/AutoBuyerSwitch.js +++ b/app/components/AutoBuyerSwitch.js @@ -1,17 +1,12 @@ -// @flow import React from "react"; import "../style/StakePool.less"; -class AutoBuyerSwitch extends React.Component { - render() { - return ( -
-
-
-
-
- ); - } -} +const AutoBuyerSwitch = ({ enabled, onClick }) => ( +
+
+
+
+
+); export default AutoBuyerSwitch; diff --git a/app/components/BalanceOverviewInfoModal.js b/app/components/BalanceOverviewInfoModal.js index 9ffffcf69b..81c5897007 100644 --- a/app/components/BalanceOverviewInfoModal.js +++ b/app/components/BalanceOverviewInfoModal.js @@ -1,39 +1,35 @@ -// @flow import React from "react"; import SlateGrayButton from "./SlateGrayButton"; import "../style/StakePool.less"; -class BalanceOverviewInfoModal extends React.Component { - render() { - return ( -
-
-
- Balance Overview Information - this.props.closeModal()}>Close -
-

- Total - This is the total balance controlled by this account currently. -
-
- Spendable Balance - The spendable/accessible balance for the this account. -
-
- Locked By Tickets - This is the balance that is currently locked by tickets for this account. Once the tickets are voted or revoked these funds will be unlocked. -
-
- Voting Authority - This balance shows the total amount that this account has voting authority over. For example, if you use a voting-only wallet this will show that total amount controlled. -
-
- Immature Rewards - These are regular coinbase rewards that are currently maturing (from PoW mining reward for instance). -
-
- Immature Stake Generation - This balance shows the current stake rewards and revocations that are awaiting maturity (256 blocks on mainnet).

-
-
-
-
); - } -} +const BalanceOverviewInfoModal = ({ closeModal }) => ( +
+
+
+ Balance Overview Information + Close +
+

+ Total - This is the total balance controlled by this account currently. +
+
+ Spendable Balance - The spendable/accessible balance for the this account. +
+
+ Locked By Tickets - This is the balance that is currently locked by tickets for this account. Once the tickets are voted or revoked these funds will be unlocked. +
+
+ Voting Authority - This balance shows the total amount that this account has voting authority over. For example, if you use a voting-only wallet this will show that total amount controlled. +
+
+ Immature Rewards - These are regular coinbase rewards that are currently maturing (from PoW mining reward for instance). +
+
+ Immature Stake Generation - This balance shows the current stake rewards and revocations that are awaiting maturity (256 blocks on mainnet).

+
+
+
+
+); export default BalanceOverviewInfoModal; diff --git a/app/components/DecredLoading.js b/app/components/DecredLoading.js index 51018a5e10..c421e60164 100644 --- a/app/components/DecredLoading.js +++ b/app/components/DecredLoading.js @@ -1,23 +1,12 @@ -// @flow import React from "react"; -import { PropTypes } from "prop-types"; import "../style/Loading.less"; -class DecredLoading extends React.Component { - - static propTypes = { - hidden: PropTypes.bool - }; - - render() { - return ( -
-
-
- ); - } -} +const DecredLoading = ({ hidden, className }) => ( +