import { randomStr } from "@utils/helpers"; import { Component, linkEvent } from "inferno"; import { SortType } from "lemmy-js-client"; import { relTags, sortingHelpUrl } from "../../config"; import { I18NextService } from "../../services"; import { Icon } from "./icon"; interface SortSelectProps { sort: SortType; onChange(val: SortType): void; hideHot?: boolean; hideMostComments?: boolean; } interface SortSelectState { sort: SortType; } export class SortSelect extends Component { private id = `sort-select-${randomStr()}`; state: SortSelectState = { sort: this.props.sort, }; constructor(props: any, context: any) { super(props, context); } static getDerivedStateFromProps(props: SortSelectProps): SortSelectState { return { sort: props.sort, }; } render() { return ( <> ); } handleSortChange(i: SortSelect, event: any) { i.props.onChange(event.target.value); } }