import { Component, linkEvent } from 'inferno'; import { SortType } from '../interfaces'; import { sortingHelpUrl } from '../utils'; import { i18n } from '../i18next'; interface SortSelectProps { sort: SortType; onChange?(val: SortType): any; hideHot?: boolean; } interface SortSelectState { sort: SortType; } export class SortSelect extends Component { private emptyState: SortSelectState = { sort: this.props.sort, }; constructor(props: any, context: any) { super(props, context); this.state = this.emptyState; } static getDerivedStateFromProps(props: any): SortSelectState { return { sort: props.sort, }; } render() { return ( <> ); } handleSortChange(i: SortSelect, event: any) { i.props.onChange(event.target.value); } }