Skip to content

Commit

Permalink
add toast notification dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Romero <[email protected]>
  • Loading branch information
joshuarrrr committed Apr 18, 2023
1 parent 8c5982c commit 815b4a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/plugins/dashboard/public/application/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import 'angular-sanitize';
import { i18nDirective, i18nFilter, I18nProvider } from '@osd/i18n/angular';
import {
ChromeStart,
ToastsStart,
IUiSettingsClient,
CoreStart,
SavedObjectsClientContract,
Expand Down Expand Up @@ -92,6 +93,7 @@ export interface RenderDeps {
setHeaderActionMenu: AppMountParameters['setHeaderActionMenu'];
savedObjects: SavedObjectsStart;
restorePreviousUrl: () => void;
toastNotifications: ToastsStart;
}

let angularModuleInstance: IModule | null = null;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dashboard/public/application/legacy_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export function initDashboardApp(app, deps) {
return deps.savedObjectsClient.delete(appId, id);
})
).catch((error) => {
toastNotifications.addError(error, {
deps.toastNotifications.addError(error, {
title: i18n.translate('dashboard.dashboardListingDeleteErrorTitle', {
defaultMessage: 'Error deleting dashboard',
}),
Expand Down

0 comments on commit 815b4a9

Please sign in to comment.