From befddc3b48465e690ed9778e194c9ce3b9a757b1 Mon Sep 17 00:00:00 2001 From: apanizo Date: Thu, 6 Sep 2018 12:33:38 +0200 Subject: [PATCH] Adding onConnect and onDisconnect to Header provider's components --- src/components/Header/actions.js | 8 ++- .../ProviderDisconnected/ConnectDetails.jsx | 4 +- .../component/ProviderInfo/UserDetails.jsx | 11 +-- .../Header/component/ProviderInfo/index.jsx | 3 +- src/components/Header/index.jsx | 70 +++++++++++-------- src/components/Header/selector.js | 8 +++ 6 files changed, 68 insertions(+), 36 deletions(-) diff --git a/src/components/Header/actions.js b/src/components/Header/actions.js index 32069043..e96a2379 100644 --- a/src/components/Header/actions.js +++ b/src/components/Header/actions.js @@ -1,6 +1,12 @@ // @flow -import { fetchProvider } from '~/logic/wallets/store/actions' +import { fetchProvider, removeProvider } from '~/logic/wallets/store/actions' + +export type Actions = { + fetchProvider: typeof fetchProvider, + removeProvider: typeof removeProvider, +} export default { fetchProvider, + removeProvider, } diff --git a/src/components/Header/component/ProviderDisconnected/ConnectDetails.jsx b/src/components/Header/component/ProviderDisconnected/ConnectDetails.jsx index ba159f75..f885f162 100644 --- a/src/components/Header/component/ProviderDisconnected/ConnectDetails.jsx +++ b/src/components/Header/component/ProviderDisconnected/ConnectDetails.jsx @@ -11,6 +11,7 @@ const connectedLogo = require('../../assets/connect-wallet.svg') type Props = { classes: Object, + onConnect: Function, } const styles = () => ({ @@ -36,7 +37,7 @@ const styles = () => ({ }, }) -const ConnectDetails = ({ classes }: Props) => ( +const ConnectDetails = ({ classes, onConnect }: Props) => (
@@ -48,6 +49,7 @@ const ConnectDetails = ({ classes }: Props) => (