mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 11:21:32 +00:00
A few fixes.
This commit is contained in:
parent
d6fdfe0b6d
commit
2f32d3e6df
3 changed files with 4 additions and 4 deletions
2
ui/src/components/data-type-select.tsx
vendored
2
ui/src/components/data-type-select.tsx
vendored
|
@ -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_,
|
||||
};
|
||||
|
|
2
ui/src/components/listing-type-select.tsx
vendored
2
ui/src/components/listing-type-select.tsx
vendored
|
@ -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_,
|
||||
};
|
||||
|
|
4
ui/src/components/main.tsx
vendored
4
ui/src/components/main.tsx
vendored
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue