Added link/PreviewCard search to search
• Added: - link/PreviewCard search to search
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import api from '../api';
|
||||
import { fetchRelationships } from './accounts';
|
||||
import { fetchGroupsSuccess, fetchGroupRelationships } from './groups'
|
||||
import { importFetchedAccounts, importFetchedStatuses } from './importer';
|
||||
import {
|
||||
importFetchedAccounts,
|
||||
importFetchedStatuses,
|
||||
} from './importer';
|
||||
import { importLinkCards } from './links'
|
||||
import { SEARCH_FILTERS } from '../constants'
|
||||
|
||||
export const SEARCH_CHANGE = 'SEARCH_CHANGE';
|
||||
@@ -52,6 +56,10 @@ export function submitSearch() {
|
||||
dispatch(importFetchedStatuses(response.data.statuses));
|
||||
}
|
||||
|
||||
if (response.data.links) {
|
||||
dispatch(importLinkCards(response.data.links));
|
||||
}
|
||||
|
||||
if (response.data.groups) {
|
||||
dispatch(fetchGroupsSuccess(response.data.groups))
|
||||
dispatch(fetchGroupRelationships(response.data.groups.map(item => item.id)))
|
||||
@@ -99,4 +107,4 @@ export function setFilter(path, value, shouldSubmit) {
|
||||
})
|
||||
if (shouldSubmit) dispatch(submitSearch())
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user