import axios from 'axios'; import Error from './Error'; const url = `https://devapi.benjamyn.love/migrations/`; export const getMigrations = () => (dispatch) => { axios.get(url) .then((response) => { dispatch({ migs: response.data, }); }) .catch((error) => { this.setState({ error: true, }); }); }