Browse Source

Minor fixes

develop
Ezerous 7 years ago
parent
commit
f377798acf
  1. 10
      package.json
  2. 4
      src/index.js
  3. 4
      src/reducer.js
  4. 7
      src/user/ui/loginbutton/LoginButtonContainer.js
  5. 8
      src/user/ui/profileform/ProfileFormContainer.js
  6. 7
      src/user/ui/signupform/SignUpFormContainer.js

10
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",

4
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,7 +25,7 @@ import registerServiceWorker from './registerServiceWorker';
// Initialize react-router-redux.
const history = syncHistoryWithStore(browserHistory, store);
ReactDOM.render((
render((
<DrizzleProvider options={drizzleOptions} store={store}>
<LoadingContainer>
<Router history={history}>

4
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

7
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

8
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

7
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

Loading…
Cancel
Save