further cleanup

This commit is contained in:
Rob Watson 2020-07-03 18:27:46 +02:00
parent 91073da873
commit 300a535481
2 changed files with 5 additions and 18 deletions

View File

@ -75,7 +75,6 @@ export class Navbar extends Component<any, State> {
} }
searchChange(i: Navbar, event) { searchChange(i: Navbar, event) {
console.log("in searchChange");
let searchParams: SearchParams = { let searchParams: SearchParams = {
q: event.target.value, q: event.target.value,
page: 1, page: 1,

View File

@ -31,7 +31,6 @@ export class Search extends Component<any, State> {
} }
componentDidMount() { componentDidMount() {
console.log("comp did mount");
this.state.searchParams = { this.state.searchParams = {
page: Number(this.props.match.params.page), page: Number(this.props.match.params.page),
q: this.props.match.params.q, q: this.props.match.params.q,
@ -44,7 +43,6 @@ export class Search extends Component<any, State> {
// Re-do search if the props have changed // Re-do search if the props have changed
componentDidUpdate(lastProps: any) { componentDidUpdate(lastProps: any) {
console.log("comp did update");
if (lastProps.match && lastProps.match.params !== this.props.match.params) { if (lastProps.match && lastProps.match.params !== this.props.match.params) {
this.state.searchParams = { this.state.searchParams = {
page: Number(this.props.match.params.page), page: Number(this.props.match.params.page),
@ -161,21 +159,11 @@ export class Search extends Component<any, State> {
<table class="table table-fixed table-hover table-sm table-striped table-hover-purple table-padding"> <table class="table table-fixed table-hover table-sm table-striped table-hover-purple table-padding">
<thead> <thead>
<tr> <tr>
<th class="search-name-col"> <th class="search-name-col">{this.sortLink("Name")}</th>
{this.sortLink("Name")} <th class="text-right">{this.sortLink("Size")}</th>
</th> <th class="text-right">{this.sortLink("Seeders")}</th>
<th class="text-right"> <th class="text-right d-none d-md-table-cell">{this.sortLink("Leechers")}</th>
{this.sortLink("Size")} <th class="text-right d-none d-md-table-cell">{this.sortLink("Scraped")}</th>
</th>
<th class="text-right">
{this.sortLink("Seeders")}
</th>
<th class="text-right d-none d-md-table-cell">
{this.sortLink("Leechers")}
</th>
<th class="text-right d-none d-md-table-cell">
{this.sortLink("Scraped")}
</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>