-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
1ac7006
commit 70333b0
Showing
6 changed files
with
147 additions
and
12 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 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 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 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 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,6 +1,21 @@ | ||
// import { take, call, put, select } from 'redux-saga/effects'; | ||
import { take, call, put, select, takeEvery } from 'redux-saga/effects'; | ||
import { loginSucceed, loginFailed } from './actions'; | ||
import Actions from './constants'; | ||
import { makeSelectLoginEmail, makeSelectLoginPassword } from './selectors'; | ||
|
||
function* login() { | ||
try { | ||
const email = yield select(makeSelectLoginEmail()); | ||
const password = yield select(makeSelectLoginPassword()); | ||
|
||
yield put(loginSucceed()); | ||
} catch (e) { | ||
yield put(loginFailed()); | ||
} | ||
} | ||
|
||
// Individual exports for testing | ||
export default function* loginPageSaga() { | ||
yield takeEvery(Actions.LOGIN.REQUEST, login); | ||
// See example in containers/HomePage/saga.js | ||
} |
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