SearchType,
SearchResponse,
WebSocketJsonResponse,
-} from '../interfaces';
+} from 'lemmy-js-client';
import { WebSocketService, UserService } from '../services';
import {
wsJsonToRes,
);
let listCommunitiesForm: ListCommunitiesForm = {
- sort: SortType[SortType.TopAll],
+ sort: SortType.TopAll,
limit: 9999,
};
if (validURL(this.state.postForm.url)) {
let form: SearchForm = {
q: this.state.postForm.url,
- type_: SearchType[SearchType.Url],
- sort: SortType[SortType.TopAll],
+ type_: SearchType.Url,
+ sort: SortType.TopAll,
page: 1,
limit: 6,
};
fetchSimilarPosts() {
let form: SearchForm = {
q: this.state.postForm.name,
- type_: SearchType[SearchType.Posts],
- sort: SortType[SortType.TopAll],
+ type_: SearchType.Posts,
+ sort: SortType.TopAll,
community_id: this.state.postForm.community_id,
page: 1,
limit: 6,