Skip to content

Commit

Permalink
Added notification when user updates group
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Aug 12, 2021
1 parent 0888d24 commit b3b582c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ui/src/app/dashboard/view/SourcesTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ import SourceList from '../../metadata/domain/source/component/SourceList';
import { useMetadataEntities, useMetadataEntity } from '../../metadata/hooks/api';
import { Search } from '../component/Search';

import { NotificationContext, createNotificationAction } from '../../notifications/hoc/Notifications';

const searchProps = ['serviceProviderName', 'entityId', 'createdBy'];

export function SourcesTab () {

const { dispatch } = React.useContext(NotificationContext);

const [sources, setSources] = React.useState([]);

const { get, response } = useMetadataEntities('source', {
Expand Down Expand Up @@ -37,6 +41,9 @@ export function SourcesTab () {
idOfOwner: group
});
if (updater.response.ok) {
dispatch(createNotificationAction(
`Updated group successfully.`
));
loadSources();
}
}
Expand Down

0 comments on commit b3b582c

Please sign in to comment.