Skip to content

Commit 1ed1147

Browse files
author
DEVfancybear
committed
add filter by Name
1 parent cba1dfb commit 1ed1147

File tree

8 files changed

+345
-151
lines changed

8 files changed

+345
-151
lines changed

package-lock.json

Lines changed: 121 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"@testing-library/react": "^9.3.2",
1212
"@testing-library/user-event": "^7.1.2",
1313
"axios": "^0.19.2",
14+
"bootstrap": "^4.4.1",
1415
"react": "^16.13.1",
16+
"react-bootstrap": "^1.0.0",
1517
"react-dom": "^16.13.1",
1618
"react-redux": "^7.2.0",
1719
"react-scripts": "3.4.1",

src/actions/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,14 @@ export const fetchDataToServer = (sort, order) => {
1212
});
1313
};
1414
};
15+
export const fetchDataToFilter = name => {
16+
return async dispatch => {
17+
const resp = await axios.get(`${URL_API}?name=${name}`);
18+
console.log(`${URL_API}?name=${name}`);
19+
const data = await resp.data;
20+
dispatch({
21+
type: types.FETCH_DATA_IN_FILTER,
22+
payload: data
23+
});
24+
};
25+
};

0 commit comments

Comments
 (0)