Merge pull request #46 from andrerfneves/bugfix/bump-flow-bin

Bugfix/bump flow bin
This commit is contained in:
George Lima 2019-01-21 22:09:23 -02:00 committed by GitHub
commit 37eb75151a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 21 additions and 17 deletions

View File

@ -70,7 +70,7 @@ type Props = {
to?: ?string, to?: ?string,
variant?: 'primary' | 'secondary', variant?: 'primary' | 'secondary',
disabled?: boolean, disabled?: boolean,
icon?: string, icon?: string | null,
className?: string, className?: string,
isLoading?: boolean, isLoading?: boolean,
}; };
@ -88,24 +88,21 @@ export const Button = ({
if (to && onClick) throw new Error('Should define either "to" or "onClick"'); if (to && onClick) throw new Error('Should define either "to" or "onClick"');
const props = { const props = {
onClick, disabled: disabled || isLoading, icon: null, className, onClick,
disabled: disabled || isLoading,
icon: null,
className,
}; };
const buttonLabel = isLoading ? 'Loading...' : label; const buttonLabel = isLoading ? 'Loading...' : label;
const component = variant === 'primary' ? ( const component = variant === 'primary' ? (
<Primary {...props}> <Primary {...props}>
{icon {icon ? <Icon src={icon} /> : null}
? <Icon src={icon} />
: null
}
{buttonLabel} {buttonLabel}
</Primary> </Primary>
) : ( ) : (
<Secondary {...props}> <Secondary {...props}>
{icon {icon ? <Icon src={icon} /> : null}
? <Icon src={icon} />
: null
}
{buttonLabel} {buttonLabel}
</Secondary> </Secondary>
); );
@ -117,7 +114,7 @@ Button.defaultProps = {
to: '', to: '',
icon: null, icon: null,
variant: 'primary', variant: 'primary',
onClick: null, onClick: () => {},
disabled: false, disabled: false,
className: '', className: '',
isLoading: false, isLoading: false,

View File

@ -105,6 +105,7 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
}, },
}); });
// $FlowFixMe
export const DashboardContainer = connect( export const DashboardContainer = connect(
mapStateToProps, mapStateToProps,
mapDispatchToProps, mapDispatchToProps,

View File

@ -9,4 +9,5 @@ const mapStateToProps = ({ walletSummary }: AppState) => ({
addresses: walletSummary.addresses, addresses: walletSummary.addresses,
}); });
// $FlowFixMe
export const ReceiveContainer = connect(mapStateToProps)(ReceiveView); export const ReceiveContainer = connect(mapStateToProps)(ReceiveView);

View File

@ -69,6 +69,7 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
resetSendView: () => dispatch(resetSendTransaction()), resetSendView: () => dispatch(resetSendTransaction()),
}); });
// $FlowFixMe
export const SendContainer = connect( export const SendContainer = connect(
mapStateToProps, mapStateToProps,
mapDispatchToProps, mapDispatchToProps,

View File

@ -9,4 +9,5 @@ const mapStateToProps = ({ walletSummary }: AppState) => ({
addresses: walletSummary.addresses, addresses: walletSummary.addresses,
}); });
// $FlowFixMe
export const SettingsContainer = connect(mapStateToProps)(SettingsView); export const SettingsContainer = connect(mapStateToProps)(SettingsView);

View File

@ -66,6 +66,7 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
}, },
}); });
// $FlowFixMe
export const TransactionsContainer = connect( export const TransactionsContainer = connect(
mapStateToProps, mapStateToProps,
mapDispatchToProps, mapDispatchToProps,

View File

@ -21,5 +21,6 @@ export const configureStore = (initialState: Object) => {
shouldEnableDevTools ? window.devToolsExtension() : f => f, shouldEnableDevTools ? window.devToolsExtension() : f => f,
); );
// $FlowFixMe
return createStore(createRootReducer(history), initialState, enhancer); return createStore(createRootReducer(history), initialState, enhancer);
}; };

View File

@ -8,6 +8,7 @@ import wallet from './wallet';
import transactions from './transactions'; import transactions from './transactions';
import send from './send'; import send from './send';
// $FlowFixMe
export const createRootReducer = (history: RouterHistory) => combineReducers({ export const createRootReducer = (history: RouterHistory) => combineReducers({
walletSummary: wallet, walletSummary: wallet,
transactions, transactions,

View File

@ -51,7 +51,7 @@ export type State = {
error: string | null, error: string | null,
isLoading: boolean, isLoading: boolean,
zecPrice: number, zecPrice: number,
addresses: [], addresses: string[],
transactions: TransactionsList, transactions: TransactionsList,
}; };

View File

@ -62,7 +62,7 @@
"eslint-plugin-jsx-a11y": "^6.0.3", "eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0", "eslint-plugin-react": "^7.7.0",
"file-loader": "^2.0.0", "file-loader": "^2.0.0",
"flow-bin": "0.84.0", "flow-bin": "^0.91.0",
"flow-coverage-report": "^0.6.0", "flow-coverage-report": "^0.6.0",
"flow-typed": "^2.5.1", "flow-typed": "^2.5.1",
"glow": "^1.2.2", "glow": "^1.2.2",

View File

@ -7283,10 +7283,10 @@ flow-annotation-check@1.8.1:
glob "7.1.1" glob "7.1.1"
load-pkg "^3.0.1" load-pkg "^3.0.1"
flow-bin@0.84.0: flow-bin@^0.91.0:
version "0.84.0" version "0.91.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.84.0.tgz#4cb2364c750fb37a7840524fa62456b53f64cdcb" resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.91.0.tgz#f5c89729f74b2ccbd47df6fbfadbdcc89cc1e478"
integrity sha512-ocji8eEYp+YfICsm+F6cIHUcD7v5sb0/ADEXm6gyUKdjQzmSckMrPUdZtyfP973t3YGHKliUMxMvIBHyR5LbXQ== integrity sha512-j+L+xNiUYnZZ27MjVI0y2c9474ZHOvdSQq0Tjwh56mEA7tfxYqp5Dcb6aZSwvs3tGMTjCrZow9aUlZf3OoRyDQ==
flow-coverage-report@^0.6.0: flow-coverage-report@^0.6.0:
version "0.6.0" version "0.6.0"