Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9c0e2eb

Browse files
bug fixed
1 parent 051dfd6 commit 9c0e2eb

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎src/sagas/index.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ import {put, takeLatest, all} from 'redux-saga/effects';
44

55
function *getNews(){
66

7-
let data;
8-
const json = yield axios('https://newsapi.org/v2/top-headlines?country=us&category=business&apiKey=cee62291e6f04d7e89859dec2c2b4b7e')
9-
.then( (response) => {
10-
data = response.data.articles;
11-
})
7+
const data = yield axios('https://newsapi.org/v2/top-headlines?country=us&category=business&apiKey=cee62291e6f04d7e89859dec2c2b4b7e')
8+
.then( (response) => response.data.articles)
129
.catch(err => err);
1310

1411
yield put({ type: "NEWS_RECEIVED", data: data });

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /