2019-03-21 01:22:31 +00:00
|
|
|
import { Component } from 'inferno';
|
2019-04-05 19:14:54 +00:00
|
|
|
import { Main } from './main';
|
2019-04-20 19:42:52 +00:00
|
|
|
import { ListingType } from '../interfaces';
|
2019-03-21 01:22:31 +00:00
|
|
|
|
|
|
|
export class Home extends Component<any, any> {
|
|
|
|
|
2019-04-20 19:42:52 +00:00
|
|
|
constructor(props: any, context: any) {
|
|
|
|
super(props, context);
|
|
|
|
}
|
|
|
|
|
2019-03-21 01:22:31 +00:00
|
|
|
render() {
|
|
|
|
return (
|
2019-04-20 19:42:52 +00:00
|
|
|
<Main type={this.listType()}/>
|
2019-03-21 01:22:31 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2019-04-20 19:42:52 +00:00
|
|
|
listType(): ListingType {
|
|
|
|
return (this.props.match.path == '/all') ? ListingType.All : ListingType.Subscribed;
|
|
|
|
}
|
2019-03-21 01:22:31 +00:00
|
|
|
}
|