Add GET /api/v2/search which returns rich tag objects, adjust web UI (#7661)
This commit is contained in:
parent
90b64c0069
commit
8bb74e50be
7 changed files with 69 additions and 56 deletions
|
@ -9,7 +9,7 @@ import {
|
|||
COMPOSE_REPLY,
|
||||
COMPOSE_DIRECT,
|
||||
} from '../actions/compose';
|
||||
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
|
||||
import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
|
||||
|
||||
const initialState = ImmutableMap({
|
||||
value: '',
|
||||
|
@ -39,7 +39,7 @@ export default function search(state = initialState, action) {
|
|||
return state.set('results', ImmutableMap({
|
||||
accounts: ImmutableList(action.results.accounts.map(item => item.id)),
|
||||
statuses: ImmutableList(action.results.statuses.map(item => item.id)),
|
||||
hashtags: ImmutableList(action.results.hashtags),
|
||||
hashtags: fromJS(action.results.hashtags),
|
||||
})).set('submitted', true);
|
||||
default:
|
||||
return state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue