Skip to content

Commit

Permalink
feat(dashboards): add success message when favoriting dashboards (#81887
Browse files Browse the repository at this point in the history
)

Add success message after favoriting/unfavoriting dashboards
  • Loading branch information
harshithadurai authored Dec 10, 2024
1 parent c3b94ea commit c7ee897
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion static/app/actionCreators/dashboards.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import omit from 'lodash/omit';

import {addErrorMessage} from 'sentry/actionCreators/indicator';
import {addErrorMessage, addSuccessMessage} from 'sentry/actionCreators/indicator';
import type {Client} from 'sentry/api';
import {ALL_ACCESS_PROJECTS} from 'sentry/constants/pageFilters';
import {t} from 'sentry/locale';
Expand Down Expand Up @@ -113,6 +113,7 @@ export async function updateDashboardFavorite(
},
}
);
addSuccessMessage(isFavorited ? t('Added as favorite') : t('Removed as favorite'));
} catch (response) {
const errorResponse = response?.responseJSON ?? null;
if (errorResponse) {
Expand Down

0 comments on commit c7ee897

Please sign in to comment.