Electron working
This commit is contained in:
@@ -5,5 +5,5 @@ import axios from "axios";
|
||||
export const getCountriesAPI = () =>
|
||||
axios.get(`http://192.168.1.200:8080/countries`);
|
||||
|
||||
export const getRegionsAPI = country =>
|
||||
export const getRegionsAPI = (country: string) =>
|
||||
axios.get(`http://192.168.1.200:8080/regions/${country}`);
|
||||
|
||||
@@ -33,18 +33,18 @@ export type CountriesAction = {
|
||||
export const countriesRequest = () =>
|
||||
({
|
||||
type: COUNTRIES_REQUEST
|
||||
}: CountriesActions);
|
||||
}: CountriesAction);
|
||||
|
||||
export const countriesSuccess = (listOfCountries: []) =>
|
||||
({
|
||||
type: COUNTRIES_SUCCESS,
|
||||
listOfCountries
|
||||
}: CountriesActions);
|
||||
}: CountriesAction);
|
||||
|
||||
export const countriesFailure = () =>
|
||||
({
|
||||
type: COUNTRIES_FAILURE
|
||||
}: CountriesActions);
|
||||
}: CountriesAction);
|
||||
|
||||
// Regions actions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user