{"size": 825, "ext": "js", "max_stars_repo_path": "src/flux/actions/StrategyActions.js", "max_stars_repo_name": "sailingmontezuma/strategiesandtrades", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/flux/actions/StrategyActions.js", "max_issues_repo_name": "sailingmontezuma/strategiesandtrades", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/flux/actions/StrategyActions.js", "max_forks_repo_name": "sailingmontezuma/strategiesandtrades", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.1219512195, "max_line_length": 66, "alphanum_fraction": 0.5321212121}
import dispatcher from "../dispatcher";


export function createStrategy(data) {
  dispatcher.dispatch({
    type: "CREATE_STRATEGY",
    data,
  });
}

export function deleteStrategy(id) {
  dispatcher.dispatch({
    type: "DELETE_STRATEGY",
    id,
  });
}


export function reloadStrategies() {
  // axios("http://someurl.com/somedataendpoint").then((data) => {
  //   console.log("got the data!", data);
  // })
  dispatcher.dispatch({type: "FETCH_STRATEGIES"});
  setTimeout(() => {
    dispatcher.dispatch({type: "RECEIVE_STRATEGIES", data: [
        {
            id: 394,
            symbol: "EURUSD",
            type: "BUY",
            status: "active"
        },
        {
            id: 722,
            symbol: "EURUSD",
            type: "SELL",
            status: "pending"
        }
    ]});
  }, 1800);
}
