mirror of https://github.com/embarklabs/embark.git
add use case of imports in different files on test_app
This commit is contained in:
parent
3b60793b25
commit
671bf58433
|
@ -1,11 +1,20 @@
|
|||
import { Component } from 'react';
|
||||
import SimpleStorage from 'Embark/contracts/SimpleStorage';
|
||||
window.SimpleStorage = SimpleStorage;
|
||||
|
||||
class App extends Component {
|
||||
action() {
|
||||
console.log("calling...")
|
||||
SimpleStorage.methods.get().call(function(err, value) {
|
||||
alert(value);
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="App">
|
||||
<header className="App-header">
|
||||
<h1 className="App-title">Welcome to React</h1>
|
||||
<h1 className="App-title" onClick={() => this.action() }>Welcome to React</h1>
|
||||
</header>
|
||||
<p className="App-intro">
|
||||
To get started, edit <code>src/App.js</code> and save to reload.
|
||||
|
|
|
@ -21,7 +21,7 @@ import 'bootstrap/dist/css/bootstrap-theme.css';
|
|||
import { Navbar, Jumbotron, Button } from 'react-bootstrap';
|
||||
|
||||
window.EmbarkJS = EmbarkJS;
|
||||
window.SimpleStorage = SimpleStorage;
|
||||
//window.SimpleStorage = SimpleStorage;
|
||||
window.Test = Test;
|
||||
window.Assert = Assert;
|
||||
|
||||
|
|
Loading…
Reference in New Issue