From 0884cd7c8ec37f94423f569f8a906764b55cc908 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Tue, 11 Sep 2018 09:11:22 +0100 Subject: [PATCH] Adding blockchain indicator --- templates/demo/app/dapp.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/demo/app/dapp.js b/templates/demo/app/dapp.js index 87f5c4a0..b57dea41 100644 --- a/templates/demo/app/dapp.js +++ b/templates/demo/app/dapp.js @@ -21,12 +21,14 @@ class App extends React.Component { error: null, activeKey: 1, whisperEnabled: false, - storageEnabled: false + storageEnabled: false, + blockchainEnabled: false }; } componentDidMount() { EmbarkJS.onReady((err) => { + this.setState({blockchainEnabled: true}); if (err) { // If err is not null then it means something went wrong connecting to ethereum // you can use this to ask the user to enable metamask for e.g @@ -81,7 +83,7 @@ class App extends React.Component { return (

Embark - Usage Example

- +