diff --git a/package.json b/package.json index 108b889..fdf13de 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,12 @@ "truffle-contract": "^3.0.4" }, "dependencies": { - "drizzle": "^1.1.4", + "drizzle": "^1.1.5", "drizzle-react": "^1.1.1", "drizzle-react-components": "^1.1.0", - "react": "^16.3.0", - "react-dom": "^16.3.0", + "eth-block-tracker-es5": "^2.3.2", + "react": "^16.3.2", + "react-dom": "^16.3.2", "react-scripts": "1.1.1", "react-redux": "^5.0.7", "react-router": "3.2.1", @@ -22,7 +23,8 @@ "redux": "^3.7.2", "redux-auth-wrapper": "1.1.0", "redux-saga": "0.16.0", - "redux-thunk": "^2.2.0" + "redux-thunk": "^2.2.0", + "web3":"^1.0.0-beta.34" }, "scripts": { "start": "react-scripts start", diff --git a/src/index.js b/src/index.js index 16f0ed1..c969cef 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ import React from 'react'; -import ReactDOM from 'react-dom'; +import { render } from 'react-dom' import { Router, Route, IndexRoute, browserHistory } from 'react-router' import { DrizzleProvider } from 'drizzle-react' import { syncHistoryWithStore } from 'react-router-redux' @@ -25,18 +25,18 @@ import registerServiceWorker from './registerServiceWorker'; // Initialize react-router-redux. const history = syncHistoryWithStore(browserHistory, store); -ReactDOM.render(( +render(( - - - - - - - - - - + + + + + + + + + + ), document.getElementById('root') diff --git a/src/reducer.js b/src/reducer.js index 4c54292..cdb38c4 100644 --- a/src/reducer.js +++ b/src/reducer.js @@ -1,12 +1,12 @@ import { combineReducers } from 'redux' import { routerReducer } from 'react-router-redux' -import userReducer from './user/userReducer' import { drizzleReducers } from 'drizzle' +import userReducer from './user/userReducer' const reducer = combineReducers({ routing: routerReducer, + ...drizzleReducers, user: userReducer, - ...drizzleReducers }); export default reducer diff --git a/src/user/ui/loginbutton/LoginButtonContainer.js b/src/user/ui/loginbutton/LoginButtonContainer.js index 244876c..91a721a 100644 --- a/src/user/ui/loginbutton/LoginButtonContainer.js +++ b/src/user/ui/loginbutton/LoginButtonContainer.js @@ -1,4 +1,4 @@ -import { connect } from 'react-redux' +import { drizzleConnect } from 'drizzle-react' import LoginButton from './LoginButton' import { loginUser } from './LoginButtonActions' @@ -15,9 +15,6 @@ const mapDispatchToProps = (dispatch) => { } }; -const LoginButtonContainer = connect( - mapStateToProps, - mapDispatchToProps -)(LoginButton); +const LoginButtonContainer = drizzleConnect(LoginButton, mapStateToProps, mapDispatchToProps); export default LoginButtonContainer diff --git a/src/user/ui/profileform/ProfileFormContainer.js b/src/user/ui/profileform/ProfileFormContainer.js index bda66a9..37dc860 100644 --- a/src/user/ui/profileform/ProfileFormContainer.js +++ b/src/user/ui/profileform/ProfileFormContainer.js @@ -1,4 +1,5 @@ -import { connect } from 'react-redux' +import { drizzleConnect } from 'drizzle-react' + import ProfileForm from './ProfileForm' import { updateUser } from './ProfileFormActions' @@ -17,9 +18,6 @@ const mapDispatchToProps = (dispatch) => { } }; -const ProfileFormContainer = connect( - mapStateToProps, - mapDispatchToProps -)(ProfileForm); +const ProfileFormContainer = drizzleConnect(ProfileForm, mapStateToProps, mapDispatchToProps); export default ProfileFormContainer diff --git a/src/user/ui/signupform/SignUpFormContainer.js b/src/user/ui/signupform/SignUpFormContainer.js index 358db7d..0378cee 100644 --- a/src/user/ui/signupform/SignUpFormContainer.js +++ b/src/user/ui/signupform/SignUpFormContainer.js @@ -1,4 +1,4 @@ -import { connect } from 'react-redux' +import {drizzleConnect} from "drizzle-react"; import SignUpForm from './SignUpForm' import { signUpUser } from './SignUpFormActions' @@ -14,9 +14,6 @@ const mapDispatchToProps = (dispatch) => { } }; -const SignUpFormContainer = connect( - mapStateToProps, - mapDispatchToProps -)(SignUpForm); +const SignUpFormContainer = drizzleConnect(SignUpForm, mapStateToProps, mapDispatchToProps); export default SignUpFormContainer