-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
156 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import * as R from 'ramda'; | ||
import { connect } from 'react-redux'; | ||
import { attemptAddTodo } from '_thunks/todos'; | ||
import AddTodoContainer from './AddTodoContainer'; | ||
import AddTodo from './AddTodo'; | ||
|
||
const mapStateToProps = R.pick([]); | ||
|
||
const mapDispatchToProps = dispatch => ({ | ||
addTodo: text => dispatch(attemptAddTodo(text)), | ||
}); | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(AddTodoContainer); | ||
export default connect(mapStateToProps, mapDispatchToProps)(AddTodo); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
client/components/organisms/SettingsMenu/SettingsMenuContainer.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import R from '_utils/ramda'; | ||
import { connect } from 'react-redux'; | ||
import { attemptLogout } from '_thunks/auth'; | ||
import SettingsMenuContainer from './SettingsMenuContainer'; | ||
import SettingsMenu from './SettingsMenu'; | ||
|
||
const mapStateToProps = R.pick([]); | ||
|
||
const mapDispatchToProps = dispatch => ({ | ||
attemptLogout: () => dispatch(attemptLogout()), | ||
}); | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(SettingsMenuContainer); | ||
export default connect(mapStateToProps, mapDispatchToProps)(SettingsMenu); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import R from '_utils/ramda'; | ||
import { connect } from 'react-redux'; | ||
import { push } from 'connected-react-router'; | ||
import HomePageContainer from './HomePageContainer'; | ||
import HomePage from './HomePage'; | ||
|
||
const mapStateToProps = R.pick(['user']); | ||
|
||
const mapDispatchToProps = dispatch => ({ | ||
pushToLogin: () => dispatch(push('/login')), | ||
}); | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(HomePageContainer); | ||
export default connect(mapStateToProps, mapDispatchToProps)(HomePage); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
import React from 'react'; | ||
import React, { useEffect } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import R from '_utils/ramda'; | ||
import LoginSection from '_templates/LoginSection'; | ||
|
||
export default function LoginPage() { | ||
export default function LoginPage({ user, pushToHome }) { | ||
useEffect(() => { | ||
if (!R.isEmpty(user)) { | ||
pushToHome(); | ||
} | ||
}, []); | ||
|
||
return ( | ||
<div className="login-page page"> | ||
<LoginSection /> | ||
</div> | ||
); | ||
} | ||
|
||
LoginPage.propTypes = { | ||
user: PropTypes.shape({}).isRequired, | ||
pushToHome: PropTypes.func.isRequired, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import R from '_utils/ramda'; | ||
import { connect } from 'react-redux'; | ||
import { push } from 'connected-react-router'; | ||
import LoginPageContainer from './LoginPageContainer'; | ||
import LoginPage from './LoginPage'; | ||
|
||
const mapStateToProps = R.pick(['user']); | ||
|
||
const mapDispatchToProps = dispatch => ({ | ||
pushToHome: () => dispatch(push('/home')), | ||
}); | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(LoginPageContainer); | ||
export default connect(mapStateToProps, mapDispatchToProps)(LoginPage); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
import React from 'react'; | ||
import React, { useEffect } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import R from '_utils/ramda'; | ||
import Register from '_templates/RegisterSection'; | ||
|
||
export default function RegisterPage() { | ||
export default function RegisterPage({ user, pushToHome }) { | ||
useEffect(() => { | ||
if (!R.isEmpty(user)) { | ||
pushToHome(); | ||
} | ||
}, []); | ||
|
||
return ( | ||
<div className="register-page page"> | ||
<Register /> | ||
</div> | ||
); | ||
} | ||
|
||
RegisterPage.propTypes = { | ||
user: PropTypes.shape({}).isRequired, | ||
pushToHome: PropTypes.func.isRequired, | ||
}; |
24 changes: 0 additions & 24 deletions
24
client/components/pages/RegisterPage/RegisterPageContainer.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import R from '_utils/ramda'; | ||
import { connect } from 'react-redux'; | ||
import { push } from 'connected-react-router'; | ||
import RegisterPageContainer from './RegisterPageContainer'; | ||
import RegisterPage from './RegisterPage'; | ||
|
||
const mapStateToProps = R.pick(['user']); | ||
|
||
const mapDispatchToProps = dispatch => ({ | ||
pushToHome: () => dispatch(push('/home')), | ||
}); | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(RegisterPageContainer); | ||
export default connect(mapStateToProps, mapDispatchToProps)(RegisterPage); |
Oops, something went wrong.