diff --git a/app/components/ModalRoot/ModalRoot.js b/app/components/ModalRoot/ModalRoot.js index 2241d0da..b7e9a6ae 100644 --- a/app/components/ModalRoot/ModalRoot.js +++ b/app/components/ModalRoot/ModalRoot.js @@ -3,11 +3,13 @@ import PropTypes from 'prop-types' import { MdClose } from 'react-icons/lib/md' import SuccessfulSendCoins from './SuccessfulSendCoins' import SuccessfulSendPayment from './SuccessfulSendPayment' +import WalletDetails from './WalletDetails' import styles from './ModalRoot.scss' const MODAL_COMPONENTS = { SUCCESSFUL_SEND_COINS: SuccessfulSendCoins, - SUCCESSFUL_SEND_PAYMENT: SuccessfulSendPayment + SUCCESSFUL_SEND_PAYMENT: SuccessfulSendPayment, + WALLET_DETAILS: WalletDetails /* other modals */ } diff --git a/app/components/ModalRoot/WalletDetails.js b/app/components/ModalRoot/WalletDetails.js new file mode 100644 index 00000000..f7250e81 --- /dev/null +++ b/app/components/ModalRoot/WalletDetails.js @@ -0,0 +1,17 @@ +import React from 'react' +import PropTypes from 'prop-types' +import styles from './WalletDetails.scss' + +const WalletDetails = () => { + return ( +
+ wallet details +
+ ) +} + +WalletDetails.propTypes = { + +} + +export default WalletDetails diff --git a/app/components/ModalRoot/WalletDetails.scss b/app/components/ModalRoot/WalletDetails.scss new file mode 100644 index 00000000..e69de29b diff --git a/app/components/Wallet/Wallet.js b/app/components/Wallet/Wallet.js index 1122df0c..8c1da301 100644 --- a/app/components/Wallet/Wallet.js +++ b/app/components/Wallet/Wallet.js @@ -6,14 +6,14 @@ import CryptoIcon from 'components/CryptoIcon' import { btc, usd } from 'utils' import styles from './Wallet.scss' -const Wallet = ({ ticker, currentTicker, balance, address, pubkey }) => { +const Wallet = ({ ticker, currentTicker, balance, address, pubkey, showModal }) => { const copyOnClick = data => { copy(data) showNotification('Noice', 'Successfully copied to clipboard') } return ( -
+
showModal('WALLET_DETAILS', {})}>
@@ -47,7 +47,8 @@ Wallet.propTypes = { currentTicker: PropTypes.object.isRequired, balance: PropTypes.object.isRequired, address: PropTypes.string.isRequired, - pubkey: PropTypes.string.isRequired + pubkey: PropTypes.string.isRequired, + showModal: PropTypes.func.isRequired } export default Wallet \ No newline at end of file diff --git a/app/routes/app/components/App.js b/app/routes/app/components/App.js index 8b4ba0e5..035ea296 100644 --- a/app/routes/app/components/App.js +++ b/app/routes/app/components/App.js @@ -31,6 +31,7 @@ class App extends Component { fetchBlockHeight, modal: { modalType, modalProps }, + showModal, hideModal, ticker, address: { address }, @@ -88,6 +89,7 @@ class App extends Component { balance={balance} address={address} pubkey={info.data.identity_pubkey} + showModal={showModal} /> {children}
diff --git a/app/routes/wallet/components/Wallet.js b/app/routes/wallet/components/Wallet.js index e21cbe02..24f772e4 100644 --- a/app/routes/wallet/components/Wallet.js +++ b/app/routes/wallet/components/Wallet.js @@ -38,19 +38,6 @@ class Wallet extends Component { return (
-
-
- -

{info.data.identity_pubkey}

-

- -

-
-