Skip to content

Commit ee4bfec

Browse files
committedJun 23, 2016
cors on server and modified itemaction
1 parent df02ad5 commit ee4bfec

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed
 

‎app.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
var express = require('express'),
22
app = express();
33

4+
app.use(function(req, res, next) {
5+
res.header("Access-Control-Allow-Origin", "*");
6+
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
7+
next();
8+
});
9+
410
app.use(express.static('src/build'));
511

612
app.listen(3000, function(){

‎src/app/containers/itemAction.jsx

-13
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,6 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => {
3535

3636
}
3737

38-
const mapDispatchToProps = (dispatch, ownProps) => {
39-
return {
40-
onClick: () => {
41-
dispatch(selectTitle(snakeCase(ownProps.item)))
42-
},
43-
onFav: () => {
44-
dispatch(editBookmark(snakeCase(ownProps.item)))
45-
dispatch(popUp());
46-
setTimeout(() => dispatch(disabledPopUp()), 500)
47-
}
48-
}
49-
}
50-
5138
const ItemLink = connect(
5239
mapStateToProps,
5340
null,

0 commit comments

Comments
 (0)
Please sign in to comment.