* Fix to update suggestion list after dismiss
* Change to inline
* Fix style
id: accountId,
});
- api(getState).delete(`/api/v1/suggestions/${accountId}`);
+ api(getState).delete(`/api/v1/suggestions/${accountId}`).then(() => {
+ dispatch(fetchSuggestionsRequest());
+
+ api(getState).get('/api/v2/suggestions').then(response => {
+ dispatch(importFetchedAccounts(response.data.map(x => x.account)));
+ dispatch(fetchSuggestionsSuccess(response.data));
+ }).catch(error => dispatch(fetchSuggestionsFail(error)));
+ }).catch(() => {});
};