Remove notification for failing to fetch JSON feed
parent
85cb48099b
commit
16f2758265
|
@ -230,11 +230,6 @@ export const notifyCurrentOrgDeleted = (): Notification => ({
|
||||||
message: 'Your current organization was deleted.',
|
message: 'Your current organization was deleted.',
|
||||||
})
|
})
|
||||||
|
|
||||||
export const notifyJSONFeedFailed = (url: string): Notification => ({
|
|
||||||
...defaultErrorNotification,
|
|
||||||
message: `Failed to fetch JSON Feed for News Feed from '${url}'`,
|
|
||||||
})
|
|
||||||
|
|
||||||
// Chronograf Admin Notifications
|
// Chronograf Admin Notifications
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
export const notifyMappingDeleted = (
|
export const notifyMappingDeleted = (
|
||||||
|
|
|
@ -4,9 +4,6 @@ import {Dispatch} from 'redux'
|
||||||
|
|
||||||
import {fetchJSONFeed as fetchJSONFeedAJAX} from 'src/status/apis'
|
import {fetchJSONFeed as fetchJSONFeedAJAX} from 'src/status/apis'
|
||||||
|
|
||||||
import {notify} from 'src/shared/actions/notifications'
|
|
||||||
import {notifyJSONFeedFailed} from 'src/shared/copy/notifications'
|
|
||||||
|
|
||||||
import {JSONFeedData} from 'src/types'
|
import {JSONFeedData} from 'src/types'
|
||||||
|
|
||||||
export enum ActionTypes {
|
export enum ActionTypes {
|
||||||
|
@ -72,6 +69,5 @@ export const fetchJSONFeedAsync = (url: string) => async (
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
dispatch(fetchJSONFeedFailed())
|
dispatch(fetchJSONFeedFailed())
|
||||||
dispatch(notify(notifyJSONFeedFailed(url)))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue