From 1da084db4eac1733de346a3b95002ec0c6e678e4 Mon Sep 17 00:00:00 2001 From: Andrew Watkins Date: Thu, 12 Jul 2018 09:22:52 -0700 Subject: [PATCH] Replace use of errorThrown with newer notify action --- ui/src/CheckSources.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ui/src/CheckSources.tsx b/ui/src/CheckSources.tsx index acc239c8da..bc35736c01 100644 --- a/ui/src/CheckSources.tsx +++ b/ui/src/CheckSources.tsx @@ -17,7 +17,6 @@ import { import {getSourceHealth} from 'src/sources/apis' import {getSourcesAsync} from 'src/shared/actions/sources' -import {errorThrown as errorThrownAction} from 'src/shared/actions/errors' import {notify as notifyAction} from 'src/shared/actions/notifications' import {DEFAULT_HOME_PAGE} from 'src/shared/constants' @@ -48,7 +47,6 @@ interface Props { location: Location auth: Auth notify: (message: Notification | NotificationFunc) => void - errorThrown: () => void } export const SourceContext = React.createContext() @@ -117,7 +115,6 @@ export class CheckSources extends Component { router, location, params, - errorThrown, sources, auth: {isUsingAuth, me}, notify, @@ -188,7 +185,7 @@ export class CheckSources extends Component { try { await getSourceHealth(source.links.health) } catch (error) { - errorThrown(error, copy.notifySourceNoLongerAvailable(source.name)) + notify(copy.notifySourceNoLongerAvailable(source.name)) } } } @@ -225,7 +222,6 @@ const mapStateToProps = ({sources, auth}) => ({ const mapDispatchToProps = dispatch => ({ getSources: bindActionCreators(getSourcesAsync, dispatch), - errorThrown: bindActionCreators(errorThrownAction, dispatch), notify: bindActionCreators(notifyAction, dispatch), })