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" "truffle-contract": "^3.0.4"
}, },
"dependencies": { "dependencies": {
"drizzle": "^1.1.4", "drizzle": "^1.1.5",
"drizzle-react": "^1.1.1", "drizzle-react": "^1.1.1",
"drizzle-react-components": "^1.1.0", "drizzle-react-components": "^1.1.0",
"react": "^16.3.0", "eth-block-tracker-es5": "^2.3.2",
"react-dom": "^16.3.0", "react": "^16.3.2",
"react-dom": "^16.3.2",
"react-scripts": "1.1.1", "react-scripts": "1.1.1",
"react-redux": "^5.0.7", "react-redux": "^5.0.7",
"react-router": "3.2.1", "react-router": "3.2.1",
@ -22,7 +23,8 @@
"redux": "^3.7.2", "redux": "^3.7.2",
"redux-auth-wrapper": "1.1.0", "redux-auth-wrapper": "1.1.0",
"redux-saga": "0.16.0", "redux-saga": "0.16.0",
"redux-thunk": "^2.2.0" "redux-thunk": "^2.2.0",
"web3":"^1.0.0-beta.34"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",

4
src/index.js

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import { render } from 'react-dom'
import { Router, Route, IndexRoute, browserHistory } from 'react-router' import { Router, Route, IndexRoute, browserHistory } from 'react-router'
import { DrizzleProvider } from 'drizzle-react' import { DrizzleProvider } from 'drizzle-react'
import { syncHistoryWithStore } from 'react-router-redux' import { syncHistoryWithStore } from 'react-router-redux'
@ -25,7 +25,7 @@ import registerServiceWorker from './registerServiceWorker';
// Initialize react-router-redux. // Initialize react-router-redux.
const history = syncHistoryWithStore(browserHistory, store); const history = syncHistoryWithStore(browserHistory, store);
ReactDOM.render(( render((
<DrizzleProvider options={drizzleOptions} store={store}> <DrizzleProvider options={drizzleOptions} store={store}>
<LoadingContainer> <LoadingContainer>
<Router history={history}> <Router history={history}>

4
src/reducer.js

@ -1,12 +1,12 @@
import { combineReducers } from 'redux' import { combineReducers } from 'redux'
import { routerReducer } from 'react-router-redux' import { routerReducer } from 'react-router-redux'
import userReducer from './user/userReducer'
import { drizzleReducers } from 'drizzle' import { drizzleReducers } from 'drizzle'
import userReducer from './user/userReducer'
const reducer = combineReducers({ const reducer = combineReducers({
routing: routerReducer, routing: routerReducer,
...drizzleReducers,
user: userReducer, user: userReducer,
...drizzleReducers
}); });
export default reducer 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 LoginButton from './LoginButton'
import { loginUser } from './LoginButtonActions' import { loginUser } from './LoginButtonActions'
@ -15,9 +15,6 @@ const mapDispatchToProps = (dispatch) => {
} }
}; };
const LoginButtonContainer = connect( const LoginButtonContainer = drizzleConnect(LoginButton, mapStateToProps, mapDispatchToProps);
mapStateToProps,
mapDispatchToProps
)(LoginButton);
export default LoginButtonContainer 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 ProfileForm from './ProfileForm'
import { updateUser } from './ProfileFormActions' import { updateUser } from './ProfileFormActions'
@ -17,9 +18,6 @@ const mapDispatchToProps = (dispatch) => {
} }
}; };
const ProfileFormContainer = connect( const ProfileFormContainer = drizzleConnect(ProfileForm, mapStateToProps, mapDispatchToProps);
mapStateToProps,
mapDispatchToProps
)(ProfileForm);
export default ProfileFormContainer 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 SignUpForm from './SignUpForm'
import { signUpUser } from './SignUpFormActions' import { signUpUser } from './SignUpFormActions'
@ -14,9 +14,6 @@ const mapDispatchToProps = (dispatch) => {
} }
}; };
const SignUpFormContainer = connect( const SignUpFormContainer = drizzleConnect(SignUpForm, mapStateToProps, mapDispatchToProps);
mapStateToProps,
mapDispatchToProps
)(SignUpForm);
export default SignUpFormContainer export default SignUpFormContainer

Loading…
Cancel
Save