import {SUBMIT, SUBMIT_DONE} from '../constants'
import {api} from '../lib/fetch'

export function submit (data) {
  return dispatch => {
    return new Promise((resolve, reject)=>{
      setTimeout(function(){
        resolve(dispatch(submit_done(data)));
      }, 1000);
    });
  }
}

export function submit_done (data) {
  return {
    type: SUBMIT_DONE,
    payload: data
  };
}

export function submit_error (err) {
  return {
    type: SUBMIT_ERROR,
    payload: err
  };
}

@@ -263,10 +263,9 @@
  %7D, 
-10
+3
 00);

. typo