mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 05:18:34 +03:00
add loading
This commit is contained in:
@@ -101,6 +101,7 @@ export function fetchDomain () {
|
||||
if (Object.values(result).some(resp => resp.hasOwnProperty('error'))) {
|
||||
throw new Error('Some URLs returned negative. If you are in development, check the server is running')
|
||||
}
|
||||
dispatch(toggleFetchingDomain())
|
||||
return result
|
||||
})
|
||||
.catch(err => {
|
||||
@@ -192,6 +193,20 @@ export function toggleFilter (filter, value) {
|
||||
}
|
||||
}
|
||||
|
||||
export const SET_LOADING = 'SET_LOADING'
|
||||
export function setLoading () {
|
||||
return {
|
||||
type: SET_LOADING
|
||||
}
|
||||
}
|
||||
|
||||
export const SET_NOT_LOADING = 'SET_NOT_LOADING'
|
||||
export function setNotLoading () {
|
||||
return {
|
||||
type: SET_NOT_LOADING
|
||||
}
|
||||
}
|
||||
|
||||
export const UPDATE_TIMERANGE = 'UPDATE_TIMERANGE'
|
||||
export function updateTimeRange (timerange) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user