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
//
-
- {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 }) => (
+
+);
export default DecredLoading;
diff --git a/app/components/ErrorScreen.js b/app/components/ErrorScreen.js
index 4b752c30b8..00a4418233 100644
--- a/app/components/ErrorScreen.js
+++ b/app/components/ErrorScreen.js
@@ -1,15 +1,11 @@
-// @flow
-import React, { Component } from "react";
+import React from "react";
import { Link } from "react-router";
-class ErrorScreen extends Component {
- render() {
- const errorView = (
-
-
Something went wrong, please go back
-
Back home
-
);
- return (errorView);
- }
-}
+const ErrorScreen = () => (
+
+
Something went wrong, please go back
+
Back home
+
+);
+
export default ErrorScreen;
diff --git a/app/components/HelpLink.js b/app/components/HelpLink.js
index 71a7c37bde..a5e98777c7 100644
--- a/app/components/HelpLink.js
+++ b/app/components/HelpLink.js
@@ -1,16 +1,9 @@
-// @flow
import React from "react";
import { shell } from "electron";
import "../style/MiscComponents.less";
-class HelpLink extends React.Component {
- render() {
- return (
-
- {this.props.children}
-
- );
- }
-}
+const HelpLink = ({ href, children }) => (
+
shell.openExternal(href)}>{children}
+);
export default HelpLink;
diff --git a/app/components/ManagePoolsButton.js b/app/components/ManagePoolsButton.js
index ac7f68b2f9..40e710feec 100644
--- a/app/components/ManagePoolsButton.js
+++ b/app/components/ManagePoolsButton.js
@@ -1,14 +1,8 @@
-// @flow
import React from "react";
import "../style/MiscComponents.less";
-class ManagePoolsButton extends React.Component {
- render() {
- return (
-
- );
-
- }
-}
+const ManagePoolsButton = ({ onClick }) => (
+
+);
export default ManagePoolsButton;
diff --git a/app/components/MenuLink.js b/app/components/MenuLink.js
index f2f3f5fa4c..7c71413ec1 100644
--- a/app/components/MenuLink.js
+++ b/app/components/MenuLink.js
@@ -1,15 +1,10 @@
-// @flow
import React from "react";
import { Link } from "react-router";
-class MenuLink extends React.Component {
- render() {
- return (
-
- {this.props.children}
-
- );
- }
-}
+const MenuLink = ({ to, children }) => (
+
+ {children}
+
+);
export default MenuLink;
diff --git a/app/components/NumTicketsInput.js b/app/components/NumTicketsInput.js
index ca82edd6dc..e8c2323d7b 100644
--- a/app/components/NumTicketsInput.js
+++ b/app/components/NumTicketsInput.js
@@ -1,23 +1,21 @@
-// @flow
import React from "react";
import "../style/NumTicketsInput.less";
-class NumTicketsInput extends React.Component {
- render() {
- return (
-
- );
-
- }
-}
+const NumTicketsInput = ({
+ numTickets,
+ incrementNumTickets,
+ decrementNumTickets
+}) => (
+
+);
export default NumTicketsInput;
diff --git a/app/components/PurchaseTicketsInfoButton.js b/app/components/PurchaseTicketsInfoButton.js
index 87378c024c..a2f88e1ac6 100644
--- a/app/components/PurchaseTicketsInfoButton.js
+++ b/app/components/PurchaseTicketsInfoButton.js
@@ -1,11 +1,8 @@
-// @flow
import React from "react";
import "../style/MiscComponents.less";
-class PurchaseTicketsInfoButton extends React.Component {
- render() {
- return
;
- }
-}
+const PurchaseTicketsInfoButton = ({ onClick }) => (
+
+);
export default PurchaseTicketsInfoButton;
diff --git a/app/components/ShowError.js b/app/components/ShowError.js
index 4d98458e01..d00bb3327c 100644
--- a/app/components/ShowError.js
+++ b/app/components/ShowError.js
@@ -1,14 +1,7 @@
-// @flow
-import React, { Component } from "react";
+import React from "react";
-class ShowError extends Component {
- render() {
- const { error, className } = this.props;
- if (error === null) {
- return null;
- }
+const ShowError = ({ error, className }) => !error ? null : (
+
{error}
+);
- return
{error}
;
- }
-}
export default ShowError;
diff --git a/app/components/SlateGrayButton.js b/app/components/SlateGrayButton.js
index 88dae207e5..4f579ca664 100644
--- a/app/components/SlateGrayButton.js
+++ b/app/components/SlateGrayButton.js
@@ -1,25 +1,11 @@
-// @flow
import React from "react";
-class SlateGrayButton extends React.Component {
- render() {
- let style = {};
- Object.assign(style, this.props.style);
- if(this.props.block) {
- style.display = "block";
- }
-
- return (
-
- {this.props.children}
-
- );
- }
-}
+const SlateGrayButton = ({ className, style, block, type, disabled, onClick, children }) => (
+
{children}
+);
export default SlateGrayButton;
diff --git a/app/components/StakeyBounce.js b/app/components/StakeyBounce.js
index 597d84c91d..8ec45a2c65 100644
--- a/app/components/StakeyBounce.js
+++ b/app/components/StakeyBounce.js
@@ -1,17 +1,6 @@
-// @flow
import React from "react";
import "../style/Stakey.less";
-class StakeyBounce extends React.Component {
- constructor(props) {
- super(props);
- }
-
- render() {
- return (
-
- );
- }
-}
+const StakeyBounce = () =>
;
export default StakeyBounce;
diff --git a/app/components/TicketsCogs.js b/app/components/TicketsCogs.js
index 3c2f2ea506..79f6955270 100644
--- a/app/components/TicketsCogs.js
+++ b/app/components/TicketsCogs.js
@@ -1,11 +1,8 @@
-// @flow
import React from "react";
import "../style/MiscComponents.less";
-class TicketsCogs extends React.Component {
- render() {
- return
;
- }
-}
+const TicketsCogs = ({ opened, onClick }) => (
+
+);
export default TicketsCogs;