import { randomStr } from "@utils/helpers";
import { Component, linkEvent } from "inferno";
import { CommentSortType } from "lemmy-js-client";
import { relTags, sortingHelpUrl } from "../../config";
import { I18NextService } from "../../services";
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);
}
}