summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-07-14 11:59:15 -0400
committerDessalines <tyhou13@gmx.com>2020-07-14 11:59:15 -0400
commit2f32d3e6dfedf985cc09d92c5be3c4b5d0f7b16c (patch)
tree0c1f7e20592767b00098c6b96038b36aefaf179f
parentd6fdfe0b6d348e0c3da5deaf5beea329ff04f068 (diff)
downloadlemmy-2f32d3e6dfedf985cc09d92c5be3c4b5d0f7b16c.tar.gz
lemmy-2f32d3e6dfedf985cc09d92c5be3c4b5d0f7b16c.tar.xz
A few fixes.
-rw-r--r--ui/src/components/data-type-select.tsx2
-rw-r--r--ui/src/components/listing-type-select.tsx2
-rw-r--r--ui/src/components/main.tsx4
3 files changed, 4 insertions, 4 deletions
diff --git a/ui/src/components/data-type-select.tsx b/ui/src/components/data-type-select.tsx
index 8e905bf4..d16c785d 100644
--- a/ui/src/components/data-type-select.tsx
+++ b/ui/src/components/data-type-select.tsx
@@ -25,7 +25,7 @@ export class DataTypeSelect extends Component<
this.state = this.emptyState;
}
- static getDerivedStateFromProps(props) {
+ static getDerivedStateFromProps(props: any): DataTypeSelectProps {
return {
type_: props.type_,
};
diff --git a/ui/src/components/listing-type-select.tsx b/ui/src/components/listing-type-select.tsx
index 6d13f19a..e9b5a031 100644
--- a/ui/src/components/listing-type-select.tsx
+++ b/ui/src/components/listing-type-select.tsx
@@ -26,7 +26,7 @@ export class ListingTypeSelect extends Component<
this.state = this.emptyState;
}
- static getDerivedStateFromProps(props) {
+ static getDerivedStateFromProps(props: any): ListingTypeSelectProps {
return {
type_: props.type_,
};
diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx
index 0560e802..0392090a 100644
--- a/ui/src/components/main.tsx
+++ b/ui/src/components/main.tsx
@@ -554,12 +554,12 @@ export class Main extends Component<any, MainState> {
}
nextPage(i: Main) {
- i.updateUrl({ page: this.state.page + 1 });
+ i.updateUrl({ page: i.state.page + 1 });
window.scrollTo(0, 0);
}
prevPage(i: Main) {
- i.updateUrl({ page: this.state.page - 1 });
+ i.updateUrl({ page: i.state.page - 1 });
window.scrollTo(0, 0);
}