UserDetailsResponse,
UserView,
WebSocketJsonResponse,
- UserDetailsView,
CommentResponse,
BanUserResponse,
PostResponse,
-} from '../interfaces';
+} from 'lemmy-js-client';
+import { UserDetailsView } from '../interfaces';
import {
wsJsonToRes,
toast,
user_id?: number;
page: number;
limit: number;
- sort: string;
+ sort: SortType;
enableDownvotes: boolean;
enableNsfw: boolean;
view: UserDetailsView;
componentDidMount() {
this.fetchUserData();
+ setupTippy();
}
componentDidUpdate(lastProps: UserDetailsProps) {
break;
}
}
- setupTippy();
}
fetchUserData() {
];
// Sort it
- if (SortType[this.props.sort] === SortType.New) {
+ if (this.props.sort === SortType.New) {
combined.sort((a, b) => b.data.published.localeCompare(a.data.published));
} else {
combined.sort((a, b) => b.data.score - a.data.score);