import { Component, linkEvent } from "inferno";
import { CommentSortType } from "lemmy-js-client";
import { i18n } from "../../i18next";
import { randomStr, relTags, sortingHelpUrl } from "../../utils";
import { Icon } from "./icon";
interface CommentSortSelectProps {
sort: CommentSortType;
onChange?(val: CommentSortType): any;
}
interface CommentSortSelectState {
sort: CommentSortType;
}
export class CommentSortSelect extends Component<
CommentSortSelectProps,
CommentSortSelectState
> {
private id = `sort-select-${randomStr()}`;
state: CommentSortSelectState = {
sort: this.props.sort,
};
constructor(props: any, context: any) {
super(props, context);
}
static getDerivedStateFromProps(props: any): CommentSortSelectState {
return {
sort: props.sort,
};
}
render() {
return (
<>
>
);
}
handleSortChange(i: CommentSortSelect, event: any) {
i.props.onChange?.(event.target.value);
}
}